function hook_locale
Allows modules to define their own text groups that can be translated.
Parameters
$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 includes/
install.core.inc - Installation task; select which locale to use for the current profile.
- locale_locale in modules/
locale/ locale.module - Implements hook_locale().
- locale_test_locale in modules/
locale/ tests/ locale_test.module - Implements hook_locale().
- system_date_format_locale in 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 modules/
locale/ locale.admin.inc - Translation template export form.
- locale_translate_export_po_form in modules/
locale/ locale.admin.inc - Form to export PO files for the languages provided.
- locale_translate_import_form in modules/
locale/ locale.admin.inc - User interface for the translation import screen.
- locale_translate_overview_screen in modules/
locale/ locale.admin.inc - Overview screen for translations.
- locale_translation_filters in modules/
locale/ locale.admin.inc - List locale translation filters that can be applied.
File
-
modules/
locale/ locale.api.php, line 19
Code
function hook_locale($op = 'groups') {
switch ($op) {
case 'groups':
return array(
'custom' => t('Custom'),
);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.