1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
/**
|
3 |
|
|
* @file
|
4 |
|
|
* Internationalization (i18n) hooks
|
5 |
|
|
*/
|
6 |
|
|
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_i18n_object_info().
|
10 |
|
|
*/
|
11 |
|
|
function i18n_node_i18n_object_info() {
|
12 |
|
|
$info['node_type'] = array(
|
13 |
|
|
'title' => t('Node type'),
|
14 |
|
|
'key' => 'type',
|
15 |
|
|
'load callback' => 'node_type_get_type',
|
16 |
|
|
'placeholders' => array(
|
17 |
|
|
'%node_type' => 'type',
|
18 |
|
|
),
|
19 |
|
|
'edit path' => 'admin/structure/types/manage/%node_type',
|
20 |
|
|
'translate tab' => 'admin/structure/types/manage/%node_type/translate',
|
21 |
|
|
// We can easily list all these objects
|
22 |
|
|
'list callback' => 'node_type_get_types',
|
23 |
|
|
// Metadata for string translation
|
24 |
|
|
'string translation' => array(
|
25 |
|
|
'textgroup' => 'node',
|
26 |
|
|
'type' => 'type',
|
27 |
|
|
'properties' => array(
|
28 |
|
|
'name' => t('Name'),
|
29 |
|
|
'title_label' => t('Title label'),
|
30 |
|
|
'description' => t('Description'),
|
31 |
|
|
'help' => t('Help text'),
|
32 |
|
|
),
|
33 |
|
|
'translate path' => 'admin/structure/types/manage/%node_type/translate/%i18n_language',
|
34 |
|
|
)
|
35 |
|
|
);
|
36 |
|
|
return $info;
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
/**
|
40 |
|
|
* Implements hook_i18n_string_info()
|
41 |
|
|
*/
|
42 |
|
|
function i18n_node_i18n_string_info() {
|
43 |
|
|
$groups['node'] = array(
|
44 |
|
|
'title' => t('Node types'),
|
45 |
|
|
'description' => t('Content type names, descriptions, help texts.'),
|
46 |
|
|
//'format' => TRUE, // This group has strings with format (block body)
|
47 |
|
|
'list' => TRUE, // This group can list all strings
|
48 |
|
|
);
|
49 |
|
|
return $groups;
|
50 |
|
|
} |