function hook_locale
7.x locale.api.php | hook_locale($op = 'groups') |
6.x core.php | hook_locale($op = 'groups') |
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 drupal-7.x/
includes/ install.core.inc - Installation task; select which locale to use for the current profile.
- locale_locale in drupal-7.x/
modules/ locale/ locale.module - Implements hook_locale().
- locale_test_locale in drupal-7.x/
modules/ locale/ tests/ locale_test.module - Implements hook_locale().
- system_date_format_locale in drupal-7.x/
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-7.x/
modules/ locale/ locale.admin.inc - Translation template export form.
- locale_translate_export_po_form in drupal-7.x/
modules/ locale/ locale.admin.inc - Form to export PO files for the languages provided.
- locale_translate_import_form in drupal-7.x/
modules/ locale/ locale.admin.inc - User interface for the translation import screen.
- locale_translate_overview_screen in drupal-7.x/
modules/ locale/ locale.admin.inc - Overview screen for translations.
- locale_translation_filters in drupal-7.x/
modules/ locale/ locale.admin.inc - List locale translation filters that can be applied.
File
- drupal-7.x/
modules/ locale/ locale.api.php, line 19 - Hooks provided by the Locale module.
Code
function hook_locale($op = 'groups') {
switch ($op) {
case 'groups':
return array('custom' => t('Custom'));
}
}