summaryrefslogtreecommitdiff
path: root/modules/locale/locale.api.php
blob: 1f11fc9030cefb776966692e2018e2c68d560a6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php

/**
 * @file
 * Hooks provided by the Locale module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Allows modules to define their own text groups that can be translated.
 *
 * @param $op
 *   Type of operation. Currently, only supports 'groups'.
 */
function hook_locale($op = 'groups') {
  switch ($op) {
    case 'groups':
      return array('custom' => t('Custom'));
  }
}

/**
 * Allow modules to react to language settings changes.
 *
 * Every module needing to act when the number of enabled languages changes
 * should implement this. This is an "internal" hook and should not be invoked
 * elsewhere. The typical implementation would trigger some kind of rebuilding,
 * this way system components could properly react to the change of the enabled
 * languages number.
 */
function hook_multilingual_settings_changed() {
  field_info_cache_clear();
}

/**
 * @} End of "addtogroup hooks".
 */