Skip to content

Instantly share code, notes, and snippets.

@penyaskito
Created September 24, 2012 19:27
Show Gist options
  • Select an option

  • Save penyaskito/3777798 to your computer and use it in GitHub Desktop.

Select an option

Save penyaskito/3777798 to your computer and use it in GitHub Desktop.
Save menu item programatically with i18n
$item = array(
'menu_name' => $menu_name,
'link_path' => $link_path,
'link_title' => $link_title,
'options' => array(
'attributes' => array('title' => ''),
'langcode' => $langcode,
'alter' => TRUE
),
'customized' => 1,
);
menu_link_save($item);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment