2012-02-21, 05:57:48
lbordas Wrote:I'm finishing up a site with 3 main languages (es, en, ca). I'm using I18N plug-in and default language is Spanish (es).
Also, I have to publish two additional versions of the home page, in German and Swedish. Problem is that when user reaches the German or Swedish pages I need to keep the text of the menus in German or Swedish (only home page has those languages versions) while the user navigates the site through the menu, but I need to fallback to the English version (which is not default) on the rest of the pages, unless the user returns to the home page where it will be shown again in German or Swedish.
In short, the idea is to have, additionally to the main languages, German and Swedish versions of the home page, and fallback to the English version for the rest of the pages, keeping the menu texts in German or Swedish.
Is there anybody who can give me some ideas on how to accomplish this?
The "easy" way is just to create the german and swedish pages and copy the english content.
Another solution, where you don't need to copy the content:
- Install the DynPages plugin
- Create a component named english with the following content:
Code:
<?php
global $url;
get_i18n_content($url.'_en',true);
?>
- Create the german and swedish pages with title and menu text and put the following in the content:
Code:
{% english %}
If the english page does contain place holders, e.g. a gallery, you need to copy the content to the english and german versions.