locale.api.php 909 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. */