Projet

Général

Profil

Paste
Télécharger (1,63 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / i18n / i18n_translation / i18n_translation.api.php @ 76df55b7

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
/**
11
 * Provide information about translation sets and involved objects.
12
 *
13
 * @see i18n_translation_set_info()
14
 *
15
 * @see hook_i18n_object_info()
16
 *
17
 * This feature relies on object information provided by i18n_object_info().
18
 */
19
function hook_i18n_translation_set_info() {
20
  $info['taxonomy_term'] = array(
21
    'title' => t('Taxonomy term'),
22
    // The class that handles this translation sets
23
    'class' => 'i18n_taxonomy_translation_set',
24
    // Table and field into that table that keeps the translation set id for each item.
25
    'table' => 'taxonomy_term_data',
26
    'field' => 'i18n_tsid',
27
    // This is the parent object (i18n object type).
28
    'parent' => 'taxonomy_vocabulary',
29
    // Placeholders and path information for generating translation set pages for administration.
30
    'placeholder' => '%i18n_taxonomy_translation_set',
31
    'list path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets',
32
    'edit path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets/edit/%i18n_taxonomy_translation_set',
33
    'delete path' => 'admin/structure/taxonomy/%taxonomy_vocabulary_machine_name/list/sets/delete/%i18n_taxonomy_translation_set',
34
    'page callback' => 'i18n_taxonomy_term_translation_page',
35
  );
36
  return $info;
37
}
38

    
39
/**
40
 * Alter i18n object information provided by modules with the previous hook
41
 *
42
 * @see i18n_translation_set_info()
43
 */
44
function hook_i18n_translation_set_info_alter(&$info) {
45
}