Community Documentation

hook_locale

6 core.php hook_locale($op = 'groups')
7 locale.api.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

▾ 3 functions implement hook_locale()

$install_locale in developer/globals.php
The locale to use during installation
install_select_locale in ./install.php
Allow admin to select which locale to use for the current profile.
locale_locale in modules/locale/locale.module
Implementation of hook_locale().

File

developer/hooks/core.php, line 2686
These are the hooks that are invoked by the Drupal core.

Code

<?php
function hook_locale($op = 'groups') {
  switch ($op) {
    case 'groups':
      return array('custom' => t('Custom'));
  }
}
?>
Login or register to post comments