i18n_translation.api.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @file
  4. * API documentation for Internationalization module
  5. *
  6. * Most i18n hooks can be placed on each module.i18n.inc file but in this case
  7. * such file must be listed in the module.info file.
  8. */
  9. /**
  10. * Provide information about translation sets and involved objects.
  11. *
  12. * @see i18n_translation_set_info()
  13. *
  14. * @see hook_i18n_object_info()
  15. *
  16. * This feature relies on object information provided by i18n_object_info().
  17. */
  18. function hook_i18n_translation_set_info() {
  19. $info['taxonomy_term'] = array(
  20. 'title' => t('Taxonomy term'),
  21. // The class that handles this translation sets
  22. 'class' => 'i18n_taxonomy_translation_set',
  23. // Table and field into that table that keeps the translation set id for each item.
  24. 'table' => 'taxonomy_term_data',
  25. 'field' => 'i18n_tsid',
  26. // This is the parent object (i18n object type).
  27. 'parent' => 'taxonomy_vocabulary',
  28. // Placeholders and path information for generating translation set pages for administration.
  29. 'placeholder' => '%i18n_taxonomy_translation_set',
  30. 'list path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets',
  31. 'edit path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets/edit/%i18n_taxonomy_translation_set',
  32. 'delete path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets/delete/%i18n_taxonomy_translation_set',
  33. 'page callback' => 'i18n_taxonomy_term_translation_page',
  34. );
  35. return $info;
  36. }
  37. /**
  38. * Alter i18n object information provided by modules with the previous hook
  39. *
  40. * @see i18n_translation_set_info()
  41. */
  42. function hook_i18n_translation_set_info_alter(&$info) {
  43. }