function hook_i18n_translate_path in Internationalization 7
Provide information about available translations for specific path.
Parameters
$path: Internal path to translate.
Return value
array Translations indexed by language code. Each translation is an array with:
- 'path'
- 'title'
- 'options'
See also
i18n_get_path_translations($path)
5 functions implement hook_i18n_translate_path()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- i18n_forum_i18n_translate_path in i18n_forum/
i18n_forum.module - Implements hook_i18n_translate_path()
- i18n_menu_i18n_translate_path in i18n_menu/
i18n_menu.module - Implements hook_i18n_translate_path()
- i18n_node_i18n_translate_path in i18n_node/
i18n_node.module - Implements hook_i18n_translate_path()
- i18n_path_i18n_translate_path in i18n_path/
i18n_path.module - Implements hook_i18n_translate_path()
- i18n_taxonomy_i18n_translate_path in i18n_taxonomy/
i18n_taxonomy.module - Implements hook_i18n_translate_path()
1 invocation of hook_i18n_translate_path()
- i18n_get_path_translations in ./
i18n.module - Get translations for path.
File
- ./
i18n.api.php, line 103 - API documentation for Internationalization module
Code
function hook_i18n_translate_path($path) {
if ($path == 'mypath') {
$translations['es'] = array(
'path' => 'mypath/spanish',
'title' => t('My Spanish translation'),
);
return $translations;
}
}