Multilingual Front Page with Panels 2

Last modified: September 25, 2008 - 10:22

One of the must-haves when you make a multilingual site is a custom front page for ever language.
There different ways of doing this, but I just discovered the first one I really like. (thanx to Earl Miles!)

If you have i18n set up and panels2 installed, you might want to try this:

The basic english front page
- create content > panel
- choose a single column
- give it a title, choose the language (e.g. english) and give it a teaser.
- click submit and choose 'Panel content'
- click the plus-sign and choose "New custom content"
- give it a title and a body and click "add pane"

You now have an simple panels-node (e.g. node #13) with the drupal path "en/node/13"

Now comes the good part...

The basic german front page
On "en/node/13" there's a tab that says "translation"!

- click "translation" ("en/node/13/translation")
- In my case it says "German, Not translated, create translation, select node"
- click "create translation"
- choose a single column again
- give it a title, choose the language (this time it's german) and give it another teaser.
- click submit and choose 'Panel content'
- click the plus-sign and choose "New custom content"
- give it a title and a body and click "add pane"

That's all Folks!

Another Way

light-blue - May 29, 2008 - 07:42

For the life of me, I couldn't make this work with multiple panels for each language-specific home page, so I came up with an alternate solution using views, which simply translates the elements from the main page into the active language. The details are here (http://drupal.org/node/108117#comment-860000), in case it helps you.

One possible step forgotten

cfmcoder - June 15, 2008 - 06:40

Make sure that you enable internationalization of the panel node by going to admin/content/types/panel and setting the Multilingual Content option to Normal or Extended.

Success

Noira - October 12, 2008 - 12:35

I got it!

The key is to set up custom blocks first, like "apple" and "apfel", set them a specific visibility - in my case it was only "en/home" or "cs/home", and then add them to the panel that is aliased as "home" in both languages.

Beware that when adding a custom block to the panel page, you must tick the feature "apply visibility settings", or it does not work. This way you can set up a single panel page filled with custom blocks, and different blocks will appear on various language versions of the site. (http://adf.davnyobycej.cz)

OK but the title of the

phicarre - November 20, 2008 - 17:34

OK but the title of the panel is not translated !

Other way

yolene - May 2, 2009 - 20:10

Thanks, this is nice but it doesn't explain how to make it frontpage ... i've been fighting with various solutions and finally found this out :
1) i created from "create conte>panels" a panel view, and then i created a translation for it (careful : don't forget to enable in the multilingual module translation for content type=panel)
2) i set for the french (my language) panel an alternative url : fr/home
3) i set for the english panel an alternative url : en/home
Then i go to site configuration>site information , and i set the front page from the default "node" value to the new relevant value "home" (without /fr or /en : this will be managed automatically by the i18n module)

It works and it's simple (and i can't believe i went through 10 other ways to do that and got stuck with it ;-) )

I hope it can help some other Drupalers

Thanks it works for me too.

intyms - July 4, 2009 - 13:18

It works also with the following settings:
1)The alternative url is the same for all languages. I write just "home".
Other settings:
2) Language negotiation: "Path prefix with language fallback" (/admin/settings/language/configure)
3) Content selection mode: "All content. No language conditions apply." (/admin/settings/language/i18n)

 
 

Drupal is a registered trademark of Dries Buytaert.