Forums / Developer / Remember language Setting

Remember language Setting

Author Message

Frank Mueller

Monday 12 September 2005 5:47:18 am

Hi Folks,

i setup a Page using an ezPublish 3rd Generation.

Everything works including multiple Language Support (english and german) but the problem is that the user have to press the link for the english translation for every page he visit.

I thought that the actual locale will be stored in a session or something similar so a user who pressed english once would get the entire page in english (as long as there are english nodes).

The function i use is out of an example i think:
{* Code to show list of translations *}
{* to use pictures, instead of text uses st.like this: 'esl-ES',concat('<img src=',"picture_name.png"|ezimage,'/>') *}
{let languages=hash('eng-GB','English','ger-DE','Deutsch')
all_translations=$node.object.current.translation_list}
{section show=$all_translations|count|gt(0)}
{section var=translation loop=$node.object.current.translation_list}
<div class="blank"><a href={concat($node.url_alias,'/(language)/',$translation.item.language_code)|ezurl}>{$languages[$translation.item.language_code]}</a></div>
{/section}
{/section}
{/let}

I can change the links in the navigation but this wont work with the links in the content (like Image Gallery).

BTW: is there an english translation.ts available which is fully translated ? (the one which was in the packade lack some translations e.g. "<source>Enter gallery</source>")

BTW2: in my share/translatons folde i only have a directory eng-US but i am using eng-GB als second locale (default is ger-DE) is there the mistake or isnt the translationfile for eng-GB in this directory ?

Kind regards
Frank

Salvatore Guarino

Monday 12 September 2005 7:13:51 am

Dear Frank,

a good idea to create a multilanguage site is to create a siteaccess for every language (es. www.mysite.com/en, www.mysite.com/it etc.) You can found a step by step guide here: http://ez.no/community/forum/install_configuration/i_really_need_a_step_by_step_guide_on_how_to_setup_a_multilingual_site

Bye,

Salvatore