cms/drupal/modules/locale/locale.api.php
changeset 541 e756a8c72c3d
equal deleted inserted replaced
540:07239de796bb 541:e756a8c72c3d
       
     1 <?php
       
     2 
       
     3 /**
       
     4  * @file
       
     5  * Hooks provided by the Locale module.
       
     6  */
       
     7 
       
     8 /**
       
     9  * @addtogroup hooks
       
    10  * @{
       
    11  */
       
    12 
       
    13 /**
       
    14  * Allows modules to define their own text groups that can be translated.
       
    15  *
       
    16  * @param $op
       
    17  *   Type of operation. Currently, only supports 'groups'.
       
    18  */
       
    19 function hook_locale($op = 'groups') {
       
    20   switch ($op) {
       
    21     case 'groups':
       
    22       return array('custom' => t('Custom'));
       
    23   }
       
    24 }
       
    25 
       
    26 /**
       
    27  * Allow modules to react to language settings changes.
       
    28  *
       
    29  * Every module needing to act when the number of enabled languages changes
       
    30  * should implement this. This is an "internal" hook and should not be invoked
       
    31  * elsewhere. The typical implementation would trigger some kind of rebuilding,
       
    32  * this way system components could properly react to the change of the enabled
       
    33  * languages number.
       
    34  */
       
    35 function hook_multilingual_settings_changed() {
       
    36   field_info_cache_clear();
       
    37 }
       
    38 
       
    39 /**
       
    40  * @} End of "addtogroup hooks".
       
    41  */