Projet

Général

Profil

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

root / drupal7 / sites / all / modules / i18n / i18n_contact / i18n_contact.i18n.inc @ 76df55b7

1
<?php
2
/**
3
 * @file
4
 * Internationalization (i18n) hooks
5
 */
6

    
7
/**
8
 * Implements hook_i18n_string_info().
9
 */
10
function i18n_contact_i18n_string_info() {
11
  $groups['contact'] = array(
12
    'title' => t('Contact forms'),
13
    'description' => t('Configurable contact form categories.'),
14
    'format' => FALSE,
15
    'list' => TRUE,
16
  );
17
  return $groups;
18
}
19

    
20
/**
21
 * Implements hook_i18n_object_info().
22
 */
23
function i18n_contact_i18n_object_info() {
24
  $info['contact_category'] = array(
25
    // Generic object title.
26
    'title' => t('Contact category'),
27
    // The object key field.
28
    'key' => 'cid',
29
    // The object load callback.
30
    'load callback' => 'contact_load',
31
    // Placeholders for automatic paths.
32
    'placeholders' => array(
33
      '%contact' => 'cid',
34
    ),
35
    // To produce edit links automatically.
36
    'edit path' => 'admin/structure/contact/edit/%contact',
37
    // Auto-generate translate tab.
38
    'translate tab' => 'admin/structure/contact/edit/%contact/translate',
39
    // Properties for string translation.
40
    'string translation' => array(
41
      // Text group that will handle this object's strings.
42
      'textgroup' => 'contact',
43
      // Object type property for string translation.
44
      'type' => 'category',
45
      // Table where the object is stored, to automate string lists
46
      'table' => 'contact',
47
      // Translatable properties of these objects.
48
      'properties' => array(
49
        'category' => t('Category'),
50
        'reply' => t('Auto-reply'),
51
      ),
52
      // Path to translate strings to every language.
53
      'translate path' => 'admin/structure/contact/edit/%contact/translate/%i18n_language',
54
    )
55
  );
56
  return $info;
57
}