laurent le cadet
|
Wednesday 14 June 2006 9:35:02 am
Hi,
I have a multilanguage site with flags (as on ez.no) It's easy to change the langage with the site access (/fr , /en, /de) but I would like to be able to change language of the current page without going back to the home page. Any hints ? Laurent
|
J-A Eberhard
|
Wednesday 14 June 2006 12:10:15 pm
Try this
<ul>
{def $locales=fetch( 'content', 'translation_list' )}
{foreach $locales as $locale}
<li>
<a href={concat("../",$locale.country_code|downcase(),"/",$module_result.content_info.url_alias)|ezurl}>
{$locale.language_name}</a>
</li>
{/if}
{/foreach}
{undef}
</ul>
Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch
|
Jeroen Sangers
|
Thursday 15 June 2006 12:40:09 am
Note that it is better not to use flags. After all, a flag is a symbol of a country, and there is no one-to-one mapping between countries and languages. I find it quite disturbing that ez.no is using flags. Why should, for example, a Portuguese select the flag of Brasil to select his native language? It's quite possible that a Portuguese does not even know the flag of Brazil. Besides that, they display the names of the languages in the language of the current page, with the result that a Portuguese who doesn't speak English is not even able to find out that his language is available! If you mention the names of the languages, please put them in the language self: English (or British English or US English, if needed), svenska, suomi, Deutsch, français... If you need something shorter, you can use the codes defined in the international standard ISO 639, either the two-letter codes of ISO 639-1, such as <b>en</b> for English, or the three-letter codes of ISO 639-2, like <b>eng</b> for English.
|
laurent le cadet
|
Thursday 15 June 2006 12:56:41 am
Your right (even if brasilian flag is well know as they are on the top 5 football teams ;). In my case, I used also full text but flags are usefull as they used a small amount of place. Laurent I'm not sure the ISO code is comprehensive by current net surfers.
|
Xavier Dutoit
|
Thursday 15 June 2006 6:26:37 am
Hi, Flags are also an usability problem for the colorblinds. If you don't see the difference between red and green, quite a few 3 bands flags are going to look the same. At least, put a alt tag with the name of the language. X+
http://www.sydesy.com
|