Hi all,
I'm working on a multilingual website, I configured the language detection in this way:
- URL
- User
- Browser

The problem is that When I type the root url for my site (www.example.com) I expect that the language is detected by the browser 'cause the URL dosen't contain language, and the user is not logged in.
My problem is that the main menu is properly loaded but the content is in the default (english) language and is not display the correct translation.

Any idea on what I have to check?

P.S. using the detection by URL everything works properly.

Thanks

Comments

nimbuz77’s picture

Maybe the problem is the predefined front page
In Configuration, settings I have:
http://www.example.com/?q=en?q=content/home

If I left blank the last part (without content/home) the "No front page content has been created yet." page is correctly displayed and translated.
Is there a trick to set the default front page translated?

nimbuz77’s picture

knalstaaf’s picture

The solution on that url still doesn't work for me (last edited on 25/05/2012 @ StackOverflow):

Might be late to the party with this answer, but after many hours spent trying to solve this myself, I've the following solution.

For Drupal 7:

1- Make sure you have the modules Variable and Variable Translations switched on.
2- Goto admin/config/regional/i18n/variable
3- Select 'Default front page' from the list, save settings.
4- Goto admin/config/system/site-information, you'll notice a block of text there saying something about some of your settings being multilingual variables and a list of links for the languages you are running which allow you to set the settings for each language.

Now, this is where the real GOTCHA comes up... clicking those links and changing the settings does nothing. Your left with the same settings still for all languages. The way around this?

Check the URL you currently on, the entire thing, so something like: http://www.mysite.com/en/admin/config/site-information/

Notice the language prefix there before /admin?? To change the settings for the other languages you want to use, switch the prefix in the URL and then make your changes. And now, as if by magic, multiple front pages, properly changing based on language.

This must be a bug in Drupal, I should get around to opening a ticket. But for now, if someone else comes across this, I hope it solves your problem too.