Forums / Install & configuration / Language priority in ez 3.8 beta 2 is not working

Language priority in ez 3.8 beta 2 is not working

Author Message

Fred Gueho

Thursday 20 April 2006 2:05:46 am

There are new possibilities for translating content in ez 3.8 :
http://ez.no/download/ez_publish/changelogs/ez_publish_3_8/multi_language_features_for_the_content_model

But the language priority is just not working.

I have set a test site with this new feature :

[RegionalSettings]
SiteLanguageList[]
SiteLanguageList[]=eng-GB
SiteLanguageList[]=ger-DE

I call my ger-DE translation by url :
http://www.mysite.com/index.php/(language)/ger-DE

And when I try a page that doesn't have a ger-DE translation, it doesn't fallback to eng-BG translation but it displays blank content.

Is it a normal behaviour ? Is anyone know how to make it work properly ?

Thank for your help.

Fred Gueho

Thursday 20 April 2006 7:58:20 am

Anyone ?

Fabio Carissimi

Friday 21 April 2006 6:03:03 am

I am working on this new multilingual content model and I am facing problems similar to yours.
I have written a kind of "language box" which provides a link to the different language versions of my content only if this translation is available. To do so I use the 'available_languages' information in the $node variable

{def $languages=$node.object.available_languages}
   {if gt($languages|count(),0)}
           {foreach $languages as $lang}   
   <a href={concat($node.url_alias,'/(language)/',$lang)|ezurl}>  {$lang} </a> | 
           {/foreach}
 {/if}
{undef $languages}

If I have English, French and German as available languages, this code displays links to
http://www.mysite.com/index.php/(language)/ger-DE, http://www.mysite.com/index.php/(language)/fre-FR and http://www.mysite.com/index.php/(language)/eng-GB.
If only french version exists, there is only a link to french version.

But I agree with you, If I call http://www.mysite.com/index.php/(language)/ger-DE and this translation do not exists,
it would be better to have the fallback to other language following the order in RegionalSettings.

But I have another problem, when i choose a language version of my content, I want the selected language to be kept.
If I choose French languages, I want to have other navigation part links that direct to French version (if available).
But in the standard installation (EzP 3.8beta2), links are in english and I think that is why current_language is still
set to 'eng-GB' (see $node.object.current_language).
Does somebody know how to change current language ? and keep it selected until change is mad by clicking on the other language link ?

that way, it would not be necessary to have a siteaccess per language.
Thanks for help

Fred Gueho

Friday 21 April 2006 6:49:12 am

Hi Fabio,

At last, I'm not alone !
It's such a pleasure to have someone answering me :)

May be you could do something with the session objet.
I think it's possible to keep the current language in the url via session variables.

It's very disappointing to have a so-called language fallback mechanism that doesn't work !
Or may be, it's just my settings or how I use it but if anyone can help us, it would be great.

Thanks.