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.

Share this
Tags:
  1. Anonymous (not verified) on Thu, 10/13/2011 - 16:53

    UNGLAUBLICH!
    Da muss erst mal einer drauf kommen!
    VIIIIIEEEELEEENNN DANK!!!

    Hatte schon ein komplzierten Work-Around in PHP gebastelt.

    Diese Variante ist wesentlich eleganter.

  2. lolek (not verified) on Sun, 10/16/2011 - 13:06

    THANKS SO MUCH !!!

  3. Anonymous (not verified) on Tue, 10/18/2011 - 14:06

    Thank you very much!

  4. Anonymous (not verified) on Thu, 11/03/2011 - 03:41

    thanks a lot...

  5. Anonymous (not verified) on Tue, 01/17/2012 - 23:42

    thanks for working solution

  6. Anonymous (not verified) on Tue, 01/31/2012 - 20:36

    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!

  7. Anonymous (not verified) on Wed, 03/07/2012 - 21:25

    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 :-)

  8. Anonymous (not verified) on Tue, 05/22/2012 - 09:53

    Simple and clear explanation >>> leads to make it perfectly work...great solution

  9. Anonymous (not verified) on Fri, 06/15/2012 - 06:36

    Thanks!

    For others just learning: before that admin link will work/appear, you need to enable the Variable Translations part of the i18n module.

  10. Anu sanker (not verified) on Thu, 09/20/2012 - 13:55

    works.. thank you

  11. Darek (not verified) on Mon, 10/01/2012 - 18:09

    you are great, muchas gracias and best regards

  12. Anonymous (not verified) on Sun, 10/28/2012 - 00:42

    Thank you very much!!! It worked like a charm, spent hours with this problem, your instructions were cleared than many other sites I saw.

  13. Haaid (not verified) on Mon, 11/26/2012 - 11:48

    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!

  14. Alex (not verified) on Sun, 02/03/2013 - 21:59

    Thank you very much!

  15. Anonymous (not verified) on Fri, 02/08/2013 - 03:22

    you are my hero! seriously!!!!

  16. Anonymous (not verified) on Thu, 05/09/2013 - 07:33

    Thanka a lot.

  17. Post new comment

    The content of this field is kept private and will not be shown publicly.
    • Web page addresses and e-mail addresses turn into links automatically.
    • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
    • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
    • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
    • Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.
    By submitting this form, you accept the Mollom privacy policy.