Implement i18n menu's programmatically I am programmatically creating primary menu's which has the node content as links . So as soon as the node content is created, a primary menu link to that node content is created.

So while creating menu's ,I am also setting the languages of menu to which it belongs. So lets say if the node content created is in french, then a primary menu link is created with the language set to french.

The problem is despite the menu item's language is set, Still it gets displayed in all the other two languages as-well (English, German). I have installed Menu translation module as well but still its not working.

So how to implement multilingual menu's programmatically?

Tks
Vil
Ensure the i18n_menu module is enabled and the menu to which you're adding links is configured to "Translate and Localize" on the Menu edit page:

For example, the setting for the main menu would be found at the following url: 

/admin/structure/menu/manage/main-menu/edit


The configuration option looks like this: