As Drupal newbie it took me a couple of days to get to the point where I am presently. With a lot of difficulites I manage to have the different nodes translated to whatever language I needed but still I am stuck with the proper Main Menu translation.
Basically I want to have my site presented in 3 languages. Normally I am always working with English (en) GUI since the translations are almost driving me nuts. The site's basic language should be German (de) thus any german content should have a path like mysite.eu/presentation. A switch to en should lead to mysite.eu/en/presentation and a switch to French (fr) accordingly to mysite.eu/fr/presentation. In addition the main menu should show up differently according to the chosen language.
In order to achieve this result I had to set up the Default Language to German (...Configuration > (Regional and) Language > List Tab) and to edit the path prefix language code from 'de' to 'blank'. BTW in the URL alias settings (... Configuration > Search and Metadata > URL aliases) I did not put any prefix (otherwise it appears twice like /fr/fr).
In the Detection and Selection Tab (location as above) I enabled all the methods (User interface text language detection) in the default order e.g. URL, Session, User, Browser and Default.
In the (... Configuration > Regional and language) Multilingual Settings > Selection Tab I checked under 'Content to filter by language': Select nodes by language (as well as taxonomy and blocks but this doesn't matter here).
Now the biggest problem I had to fight with was that the main menu did not show up at all anymore when the 'de' labelled nodes were the only ones with an enabeld menu link. I had to monkey around quite a bit until I found the relationship with the content filtering by language AND the non usage of the 'de' prefix link (see above).
In other words I on purpose chose the default language German instead of English because it was the only way of getting rid of the 'de' prefix but this seems exactly the problem causing the German labelled menus not to show up anymore. Thus it seems that a prerequisite for the correct multilingual menu presentation is the use of the language prefixes for every language, even the default one.
I don't know if this is a bug or if it's supposed to be by design?
Can anyone else having a multilingual site runnning under D7 confirm this problem and / or give me some hints about doing it another way?
Thanks a lot in advance!
Comments
EDIT Trial and error, always
EDIT
Trial and error, always the best when there's no other solution (e.g. proper documentation) :/
For those who will stumble on this post here is a solution I could find to this riddle:
In the 'Detection and Selection' settings I just enabled URL and (forcefully) default. As default language I selected German in this example and in the language list I edited German to have no 'de' prefix added.
In order to find a good solution for the menus a possible way is to create a new block for every language, populate it with the necessary links and configure the given block to only show for a given language (vertical tabs). Still I don't know what is the purpose and usage of checking 'Make this block's title translatable' since I could not reach anything with this so far (and I'll abandon now).
Also I could not find a way to translate the Main menu block title but it's possible to simply override the block title if needed and as said to create other blocks for additional languages.
Finally I also failed to find a way to translate the title of the language switcher block and I didn't find a way to create another one until now. In the meantime to put in the block title can be a half solution.
Same thing
The story of my life bro, i just started hating drupal really bad because of that. Like isn't what most people really want to be able translate fucking everything why woudn't they put it in the core module ? Seriously i need that same thing too. And went to IRC and forum and the lack of support is incredible via this issue!
*Note : i am fucking mad!
multilanguage menu
Hi,
with the current i18n module, you can rather easily create the multilanguage setup you want. It may be best to start with one language. Enable the language-setting with translation for each content type (after enabling the i18n modules), create your content with the language set to English (not language neutral!). This should give you a complete site in English. After that, you go through your nodes one by one, translate these, switch on the "create menu links", and you are almost done. There is no need to creat separate menu blocks - only the items according to the current language show up, so you can have all language's items in one menu.
Cheers, Lars.
read:
http://evolvingweb.ca/story/drupal-7-multilingual-whats-new-i18n
Hi Grobe, that same procedure
Hi Grobe,
that same procedure works for me as well with the Main Menu items, I can have all the items appearing properly translated, but it doesn't work with child items of any of the Main Menu items, in fact the Main Menu shows child items only for the main language. I use a superfish menu. Do you have an idea of why this is happening to me?
Thanks a lot.
Cheers, Luca
This works great for me until
This works great for me until I try to create a menu item for a view display. For example, I created a "news" page with contains a view display of all articles. Within the view I created two pages, one for the English articles and one for the Spanish articles. None of these have menus created though the view. Instead I tried to create a menu item called news, with the path to the English portion of the view and then a translated version of that menu item (notices) with the path to the spanish portion. Problem is, this creates another menu item and it displays both regardless of which language I select. Hope this makes sense.
This is exactly what is
This is exactly what is happening to me too!
I want the menu item to show only in one language, not in three. I have followed this: http://drupal.org/node/1268692 but it is still not working.
My Fix
I managed to fix this by adding a language suffix to each Menu Link PATH in the translation set for a particular Menu Tab:
ADMIN>Structure>Menus>ListLinks ...... for each member of the Translation Set, Edit> Path = node/3/de (etc.)
of course this requires that you have a .de entity translation set up for the specified node.
(the source language will work without the suffix)
Fixed for my issue
In the strcture -> menu -> main menu -> edit
admin/structure/menu/manage/main-menu/edit
check Multilingual options
Translate and Localize. Menu items with language will allow translations. Menu items without language will be localized.
Then save.
Then the main menu has been translated
Are you using administration language?
Hi Peniel,
I'm trying to do what you describe but it won't work for me. I get English (the language set as administration language) and Czech (main language) but not Slovak (an additional language).
I have administration language installed and I use URL as the only detection method. Are you using the same? Would be very grateful for any input on this matter.
Detection method
One thing that could be causing issues is the order of your detection method. For my use case, I have separate domains (en.domain.com, de.domain.com and fr.domain.com). I need to include "URL" as my top detection method, rather than browser language, to get the menus to show. This can be switched at admin/config/regional/language/configure .
Detection Method
This was my blocker. I had configured USER SETTING detection highest on the list thinking that the named user's preference should always take precedence. But placing USER SETTING high on the list causes the Anon user's default language setting to override the initial experience for non-registered users.
Chris Luther