By La Teresto on
There are many translations available on my Drupal website. I want to make the menu from the selected language appear and hide the others. First I tought there would be a translation option from il8n module but I can't find if there is any. Then I would try with the URL but the "/en/" or "/fr/" is not recognized for the hide/show block dependant on URL. Here comes my question :
What is the easiest way to control menu visibility with language?
Comments
Same menu, different menu?
Is it the same menu, over and over again, in different languages? Or is it really different menus; Germans get one set of links, French get another?
If it is the same menu over and over you can just translate it using the locale module.
Next question; are you using 4.6 or 4.7?
- Robert Douglass
-----
My Drupal book: Building Online Communities with Drupal, phpBB and WordPress
i18n_menu.module
Jose Reyero, maintainer of i18n.module, introduced a "sneak preview" of an additional module for menu translations. It's a sneak preview, as he is working for a final realease in the 4.7 version of i18n, and I'm not too sure, but I think it's part of CVS already.
Anyway, here's the link to the latest i18n_menu.module I've got:
- http://drupal.org/node/14783#comment-52608
Then, Jose suggested an extra, very import line of code here:
- http://drupal.org/node/14783#comment-52805
To make menu items pointing to the right nodes, in my case dutch menu items should point to the dutch versions of a node, while english menu items should point to the english ones :D, I had to change some code in i18n.inc. You can find info on that here:
- http://drupal.org/node/14783#comment-55624
I think basically the whole post (http://drupal.org/node/14783) has quite a lot of information, although it's a long conversation. But with the info there, I've got it done and it really works like a charm!
Cheers,
Marc
___________________
discover new oceans
lose sight of the shore
It works
Thanks for the help, everything is working all right