Skip to main content
Contact us on +32 2 306 02 11 or mail us at info@desk02.be

Managing Multilingual Menus in Drupal

In Drupal there are basically two main ways to do multilingual menus. The first one is using the i18nmenu module from the i18n module.

Menu translation module.

Enabling this module will give you the possibility to either set a language per menu item or to translate the label and description through the "translate interface" functionality.

Language menu item option.

The downside of this method is that having all your menu items in one menu can become unwieldy when you have lots of languages and/or if the menus don't have to be 100% the same for each language.

At Desk02 we always use the other method to do multilingual menus in Drupal. This method consists of using one menu per language. If your site has two languages you will have a menu "Primary links English" and another one, "Primary links Dutch" for example. By using the language dependent variables functionality from the i18n module you can then configure the menu settings to use the correct menu for each language.

Language dependent variable marker.

When using a different menu per language you can also use the "block translation" module to set a language for the block. That way the block is only shown when the user is viewing the site in that language.

Block configuration language options.

The downside of this approach is two-fold. First there is the issue that the menu list becomes cluttered. We often have at least one primary menu and one footer menu per language. In our last project we had 6 languages which would result in 12 menus in the overview.

The other issue is that when you have to select a parent item for a menu link you always have all the menus to choose from. The hierarchical select module can somewhat alleviate this issue but not completely. This often results in putting the item at the wrong place.

Menu item parent selection.

Our last project used 6 languages and 4 different menus per language resulting in 24 menus. Managing this would be impossible for a non-experienced Drupal user so we came up with the i18nmenus module.

If you enable this module you will be able to set a language per menu (not menu item).

Set menu language option.

When you navigate to the menu overview page at admin/build/menu you will now see tabs, one for each language. Clicking the tabs will filter the overview page and it will only list the menus that have been set to that language. This results in a more manageable overview.

Menu language selection.

The last and maybe most important feature of this module is that it will also filter the available parent items when setting a menu item. When adding a Dutch node to the menu only the menus set to either "All languages" or "Dutch" will be available in the "Parent item" dropdown. This makes it almost impossible to add a node to an incorrect menu.

You can download this module at the bottom of this blog post or join the discussion at http://drupal.org/node/1039152 to see how and if this will integrate with the existing i18n module.

Currently only a D6 version is available but a D7 version will be available in about a week. Stay tuned!

AttachmentSize
i18nmenus.tar_.gz1.97 KB

Tags: Drupal, i18n

Comments

This is great!

Almost all of my sites are multilingual and I have been having the same issues described in your post.

Thanks for sharing your work!

Hi there,
is there any chance that the version for D7 is going to be released soon?
Thanks, Luca

Hai! I would be particularly interested in a similar functionality, but to filter menu links, not menus, by language. Did you ever come across anything like that?

Would be great to hear from you. This one's driving me nuts.. :-P

@Olivier: As far as I know there isn't a module that does that for individual links.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. The supported tag styles are: <foo>, [foo].
  • Feweb - Federatie van webontwikkelaars
  • Lid van Drupal Association
  • Sugar CRM