Skip to content

Instantly share code, notes, and snippets.

@vijaycs85
Last active December 13, 2015 22:39
Show Gist options
  • Save vijaycs85/4986192 to your computer and use it in GitHub Desktop.
Save vijaycs85/4986192 to your computer and use it in GitHub Desktop.
<?php
$translation_set = i18n_translation_set_create('menu_link');
// translation array
$mlids = array();
$translation_set->reset_translations();
foreach ($mlids as $lang => $item_name) {
list($menu_name, $mlid) = explode(':', $item_name);
$item = menu_link_load($mlid);
$translation_set->add_item($item, $lang);
}
// @todo: set title
$translation_set->title = '';
$translation_set->save(TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment