How to make a link on your front site do swith language ?
First, read this answer from Paulo Almeida how setup a multilingual site: http://ez.no/developer/ez_publish_3/forum/setup_design/really_i_need_help_about_ulr_alias_language_
The, you can create links to switch between languages by this way:
- assuming you have settings\siteaccess\yoursite_eng\ and settings\siteaccess\yoursite_por\ for each language.
- create this links:
<a href="/index.php/yoursite_por/">Português</a> <a href="/index.php/yoursite_eng/">English</a>
thank you very much, axel. I did exactly what you said and this works. i simply thought i could have one link only. if i'm on the english site there would appear a text saying switch to german and vice versa. for this to work, i would have to be able to find out in my template what language is currently set.
You can read the current language from the ini settings using the ezini operator.
{section show=eq(ezini('RegionalSettings','Locale'),'eng-GB')}
This is english {/section}
It will automatically pick up ini overrides. (To read variables from other ini files than site.ini, use the file name as a third parameter to the ezini call.)
You must be logged in to post messages in this topic!