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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:11:01
Script start
Timing: Jan 18 2025 22:11:01
Module start 'layout'
Timing: Jan 18 2025 22:11:01
Module start 'content'
Timing: Jan 18 2025 22:11:02
Module end 'content'
Timing: Jan 18 2025 22:11:02
Script end

Main resources:

Total runtime1.0384 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.1641152.6563
Module start 'layout' 0.00660.0034 740.820339.5078
Module start 'content' 0.01001.0269 780.3281497.1484
Module end 'content' 1.03690.0014 1,277.476612.1094
Script end 1.0383  1,289.5859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3395160.0002
Check MTime0.00140.1394160.0001
Mysql Total
Database connection0.00110.108310.0011
Mysqli_queries0.980694.4342600.0163
Looping result0.00050.0514580.0000
Template Total0.994695.820.4973
Template load0.00240.234620.0012
Template processing0.992295.549420.4961
Template load and register function0.00010.011510.0001
states
state_id_array0.00100.097010.0010
state_identifier_array0.00090.088220.0005
Override
Cache load0.00200.1968430.0000
Sytem overhead
Fetch class attribute can translate value0.00060.058420.0003
Fetch class attribute name0.00090.084040.0002
XML
Image XML parsing0.00020.021420.0001
class_abstraction
Instantiating content class attribute0.00000.000740.0000
General
dbfile0.00640.6161100.0006
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs