function hook_locale

Allows modules to define their own text groups that can be translated.


$op: Type of operation. Currently, only supports 'groups'.

Related topics

4 functions implement hook_locale()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

install_select_locale in drupal/includes/
Installation task; select which locale to use for the current profile.
locale_locale in drupal/modules/locale/locale.module
Implements hook_locale().
locale_test_locale in drupal/modules/locale/tests/locale_test.module
Implements hook_locale().
system_date_format_locale in drupal/modules/system/system.module
Gets the appropriate date format string for a date type and locale.
9 invocations of hook_locale()
locale_translate_export_pot_form in drupal/modules/locale/
Translation template export form.
locale_translate_export_po_form in drupal/modules/locale/
Form to export PO files for the languages provided.
locale_translate_import_form in drupal/modules/locale/
User interface for the translation import screen.
locale_translate_overview_screen in drupal/modules/locale/
Overview screen for translations.
locale_translation_filters in drupal/modules/locale/
List locale translation filters that can be applied.

... See full list


drupal/modules/locale/locale.api.php, line 19
Hooks provided by the Locale module.


function hook_locale($op = 'groups') {
  switch ($op) {
    case 'groups':
      return array(
        'custom' => t('Custom'),