Adding and translating a menu

This page explains how to manually enter menu items and translate them using the Translate tab.

The Translation Management module automates this completely. It will create multilingual menus when you translate nodes.

We will now add a menu item to the Primary links for the default language and create translated menus for other languages. This menu will link to each language home page and display correct text for the appropriate language.

There are 2 ways of doing this:

1) Edit the page and add a menu

or

2) Add menus via the administration pages.

 


Method 1:

 

1) Select your home page and select "Edit" and click on "Menu settings" if they are not shown

Add a menu

 

2) Enter a name for the menu, "Home" in this case

Add a menu name

 

3) Save the page. We have now created a "Home" page menu.

menu created

 

4) Repeat the steps for the translated home page and change the menu link title to the correct translation of "Home", "Inico" for our Spanish page in this example

Spanish page menu

5) Resulting menu for the Spanish home page.

Spanish page menu

 

 


Method 2:

Using this method we create the menus from the administration pages.

1) Navigate to http://yourdomain.com/admin/build/menu-customize/primary-links and select "Add item"

2) Create a menu for the English home page. You need to set the Path, Title and make sure you set the Language to "English"

Create menu english

 

3) Repeat for the spanish home page and set the path to the Spanish home page, the title in Spanish and set the language to "Spanish".

Spanish menu

4) This should now give the same results as method 1.

 

 


 

NOTE: On some administration pages both menus are shown.

Both menus

This is by design and only the menus for the current language will be displayed for normal users.

 

Comments

both menu items appear EN and CS

Hi,

method 2 has worked fine for me until I entered the wonderful world of using Panels and Views. Since the panel has a language selection mode, the menu item has the same path for both languages. When using the same path for both languages, both menu items show up no matter what language is selected. Is this a bug?

First method does not work

I used the first method for my English/Japanese site but all it did was show me two menu items. One in English and the other in Japanese. This even when I was not logged in as admin.

I did not try the second method since trying to find the node address of all my menu pages is too much of a pain.

Instead of the tips given above I am using this module:

http://drupal.org/project/translation_table

Did not work for me too,

Did not work for me too, trying a few times following your directions carefully but no results, yo miss some step?. Even that thanks for share.

What's not working?

Which step didn't work for you? What are you stuck at?

Great Tutorial

Thanx it was really useful.

P.S. Follow strictly the steps mentioned above otherwise it won't work. I tried before doing this differently and it didn't work, also if you modify paths/titles. Not really sure about the reason but it seems its quite sensitive.

Cheers

does not work for some reason

wonder why... I do as recommended, but it does not look like my menus are translated.. The same menu carries through all the pages, and if I change something, regardless of the language, it goes to other pages as well..??

Same problem here

The first method work well, the second not.
When modify links inside the administrator page the problems return again.

Sorry for my bad english.

known issue, check this

known issue, check this http://groups.drupal.org/node/13092#comment-86781 and this http://drupal.org/node/313302
2 methods and the choice is yours, i personally like the theme hack..

Thanks for sharing.Good post

Thanks for sharing.Good post