Aug
4
Setting a different front page for each language in Drupal 7
Thu, 08/04/2011 - 14:37
The use case: a multilingual Drupal 7 site, with each language having a different node to serve as front page. Each of the nodes have the same URL alias "home". Setting the homepage to the "home" URL does not work, since the Path module is returning the first match it finds, causing the wrong translation to be shown for all but one language.
The solution is in the i18n_variables module which is a part of the Internationalization module. This module allows to customize the front page variable for every language separately.
We have to let Drupal know that the front page URL needs to be a multilingual variable. This can be done in Configuration » Regional and language » Multilingual settings » Variables (admin/config/regional/i18n/variable). The variable is called "Default front page"; place a checkmark in front of it and save.
Now when you go to the Site Information administration page at Configuration » System » Site information (admin/config/system/site-information) you can switch between all available languages and set the front page for each one separately. Make sure you use the original node URLs (eg. node/24), not any aliases you might have set.

UNGLAUBLICH!
Da muss erst mal einer drauf kommen!
VIIIIIEEEELEEENNN DANK!!!
Hatte schon ein komplzierten Work-Around in PHP gebastelt.
Diese Variante ist wesentlich eleganter.
THANKS SO MUCH !!!
Thank you very much!
thanks a lot...
thanks for working solution
I've been messing with it for hours!
Your post saved me from spending many more trying to find out how to do it!
THANK YOU A THOUSAND TIMES!
Many thanks, mate :-) !
I also have been struggling with this this afternoon, in fact I was using the alias of the pages and not the actual node ids !
What fooled me I think is the fact that on the Site Information page, the Default Front Page URL which is being printed shows the language suffix (in my case /en), and not the expected /fr.
Cheers :-)
Simple and clear explanation >>> leads to make it perfectly work...great solution
Thanks!
For others just learning: before that admin link will work/appear, you need to enable the Variable Translations part of the i18n module.
works.. thank you
you are great, muchas gracias and best regards
Thank you very much!!! It worked like a charm, spent hours with this problem, your instructions were cleared than many other sites I saw.
Ok, this is what i was looking for all along. The other sites i had found were aimed at Drupal6 but I was working with a Drupal7 page,... thanks a bunch!
Thank you very much!
you are my hero! seriously!!!!
Thanka a lot.
Post new comment