Forums / General / Multiple languages

Multiple languages

Author Message

Philip K.

Tuesday 13 December 2005 7:48:30 am

Hi.

I created an article in my ezP in two different languages (German, English).
How can I switch the site so that the visitor can view the article in the different languages??

Linux is like a wigwam; no windows, now gates, and apache inside!

Philip K.

Tuesday 13 December 2005 8:21:37 am

OK, I found a solution - sometimes I should be more patient when searching for something in the forum :)

Here is a solution that works:

{* 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('cat-ES','Catalan',									'chi-CN', 'Chinese', 'cze-CZ', 'Czech', 'dan-DK','Danish', 'dut-NL','Dutch', 		'eng-CA','English (Canada)', 'eng-GB','English (United Kingdom)', 		'eng-US','English', 'esl-ES','Español', 'esl-MX','Castillan', 'fin-FI','Finnish', 'fre-CA','French (Canada)', 'fre-FR','Français', 'ger-DE','German (Germany)', 'hun-HU','Hungarian', 'ita-IT','Italian', 'nno-NO','Norwegian (Nynorsk)', 'nor-NO','Norwegian (Bokmal)', 'pol-PL','Polish', 'por-BR','Portuguese (Brasil)', 'por-MZ','Portuguese (Mozambique)', 'por-PT','Portuguese (Portugal)', 'rus-RU','Russian', 'swe-SE','Swedish')

all_translations=$node.object.current.translation_list}
	
{section show=$all_translations|count|gt(0)}
   {section var=translation loop=$node.object.current.translation_list}
       <a href={concat($node.url_alias,'/(language)/',$translation.item.language_code)|ezurl}>{$languages[$translation.item.language_code]}</a> | 
    {/section}
{/section}
	
{/let}

found here:
http://ez.no/products/ez_publish_cms/documentation/configuration/configuration/language_and_charset/how_to_setup_a_multilingual_site

Linux is like a wigwam; no windows, now gates, and apache inside!

Jorge estévez

Tuesday 13 December 2005 11:02:06 am

Ok, works great, I was looking for something like that..

BUT, wen I change to another node it goes back to the default language, There must be a way to "set" de default language to the one changed by the user so it keeps the currently selected language..

Do yo kwo how to do that? Or someone else could help with this issue..

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com