function i18n_menu_node_prepare_translation in Internationalization 7
Implements hook_node_prepare_translation().
File
- i18n_menu/
i18n_menu.module, line 867 - Internationalization (i18n) submodule: Menu translation.
Code
function i18n_menu_node_prepare_translation($node) {
if (empty($node->menu['mlid']) && !empty($node->translation_source)) {
$tnode = $node->translation_source;
// Prepare the tnode so the menu item will be available.
node_object_prepare($tnode);
$node->menu['link_title'] = $tnode->menu['link_title'];
$node->menu['weight'] = $tnode->menu['weight'];
}
}