0

On a multilingual website, why would I use the i18n_menu module to translate the menu items of a menu instead of simply making separate menus for each language? I read Gabor Hojtsy's excellent article on the menu system in D7 but I still don't understand in what sort of use case I would want to use i18n_menu vs. simply creating separate menus for each language and setting them to display only for their respective languages.

1

You have a lot more flexibility when using one menu for each individual language. It's a bit more work to setup but it definitivly pays out in the long run.
These are the points that are blocking me for using one translatable menu:

  • You're not able to reorder menu items for only one language.
  • You can't deactivate one particular link in one language, the content needs to be disconnected from the link.

  • Bottom line is when you're sure that you have a fixed menu that doesn't need flexibility it's OK to use i18n_menu.
    When building a site that could be expanded in the future and has differences between language content avoid the use of i18n_menu and set up a menu for each language. (You can set a fixed language in order to do some ajax magic and only show the menu items available for each language when creating new content.)

    1

    I think the main interest of going for multilingual menu vs one per language is the maintenance cost.

    It of course depends on the number of languages you have to manage. Two or three is OK, but if you have say eight languages to set up, things can become very complicated with several menus.

    Also, node related menus are hard to handle with non i18n solutions.

    • Could you please clarify what you mean by "node-related menus"? – Patrick Kenny Apr 24 '12 at 6:40
    • I mean : menu entries which are created at node creating time, when you check the option in the node creation form. – Countzero Apr 24 '12 at 6:56
    • Fixed language on menus and adding ajax to the node forms handles the complication of the select menu. – JurgenR Apr 24 '12 at 6:59
    • I believe you when you say it can be handled, but I just wanted to say it was more hassle in certain use cases, particularly with a lot of languages. BTW, do you have a link about the solution you're talking about ? I could be interested, as as of now, I don't see what AJAX has to do with it. – Countzero Apr 24 '12 at 7:14
    • 1
      It could be really complicated to work with lots of languages. Therefore you could use ajax to rebuild the form with the menu options depending on the selected language. Currently I don't have a link to an example but roughly said you can add a wrapper to the node form and add ajax to the language select box. On language swith rebuild the form and recreate the menu options depending on the selected language. I let you know when I have a link to an example. – JurgenR Apr 24 '12 at 7:44

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.