While building another multilingual site - this time in D7 - am back at the point of how to deal with the menus.
Note that, though the "Contact" module (the contact form) is part of Drupal core, the translation of its menu title requires the "internationalization" contributed module. See HowTo: Basic Internationalization setup.
I had a brief look at the new translation functions in D7 and they all look a good step forward - for ex. see more here:
- Drupal 7's new multilingual systems (part 1) - The basics and further parts ...
But translating a website is not a simple thing and the ins and outs are quite complex - just think about the admin language you know all the terms in (your personal default) and then look at those translation into one or another language you also master - often there is no correlation and you need to switch back and forth to work your way through things.
While simply translating a menu is great in many cases there are certain limitations.
This time I am building a website for proximity searches - the background for this project is here - Openlayers Proximity Search – D7 - the background.
Now, when the site is ready it should go life in English, Spanish and German.
For this project I need Views with Openlayers and proximity search. Translating Views is not that simple as there are various headers, titles, labels and so on. For some projects Internationalization Views might work - but not for this one. I find it easier to clone particular views and give them their own menu links with fixed language menus.
My default language is English and I add for each language - including the default one the "Path prefix language code" under - for ex.
www.example.com/admin/config/regional/language/edit/en - "en".
Once done all languages will show up with the prefix - so the path above will be from then on
I wonder whether in a multilingual site there is a need for a "default" language not using the prefix. To me, at the moment, it seems that once you use different languages all should be identified by the prefix. I feel it makes my work as a site builder easier - anyway - add you thoughts any time below.
I then create the fixed language menus -
- Main Menu en
- Main Menu de
- Main Menu es
Back to my Proximity View I clone the pages for the prox. search for the other languages and change their path like this:
- en - /near_you
- de - /in_deiner_nähe
- es - /cerca_de_ti
and the relating menu items are then allocate to the relevant "Main Menu en/es/de"
You also have to clone and then translate and attachment views you might have - an relate them to the relevant language.
Not too much different, but under certain circumstances easier might be cloning the entire View for each language and then working your way through adapting each View for one language.
---- ...... could be continued - do add your tipps & tricks directly or by comment and they can be added at some point .... ----