multiple frontpages in multiple languages

Ek Kosmos picture Ek Kosmos · Mar 2, 2011 · Viewed 9.7k times · Source

I have a Drupal 7 multi-language(3) website. I have installed the Internationalization (7.x-1.0-beta2) module.

I have created for each language a page, and translate it into two others languages.

Now here is what I want to do: to set a kind of intelligent "front-page" to know what language is selected and set the front page (which I choose) in that language.

How can I do this? I know that in Internationalization module, there is no such kind of thing, am I right? If I set the front page to nothing I get this message: “No front page content has been created yet.” which is normal because Drupal is asking me for one front-page to be set, however I want to have for each language a front-page.

Answer

Ben picture Ben · Jul 24, 2011

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 the 'Site information' list tab and check 'Default front page', 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 are currently on, the entire thing, so something like: http://www.example.com/en/admin/config/system/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.