1. 8.2.x core/modules/locale/locale.api.php
  2. 8.0.x core/modules/locale/locale.api.php
  3. 8.1.x core/modules/locale/locale.api.php
  4. 8.3.x core/modules/locale/locale.api.php
  5. 7.x modules/locale/locale.api.php

Hooks provided by the Locale module.

File

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

Functions

Namesort descending Description
hook_locale Allows modules to define their own text groups that can be translated.
hook_multilingual_settings_changed Allow modules to react to language settings changes.