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.

eZ debug

Timing: Jan 20 2025 10:58:37
Script start
Timing: Jan 20 2025 10:58:37
Module start 'content'
Timing: Jan 20 2025 10:58:38
Module end 'content'
Timing: Jan 20 2025 10:58:39
Script end

Main resources:

Total runtime1.5560 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 589.2031180.8047
Module start 'content' 0.00841.2702 770.0078502.2578
Module end 'content' 1.27860.2772 1,272.2656337.4453
Script end 1.5559  1,609.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00460.2928210.0002
Check MTime0.00150.0961210.0001
Mysql Total
Database connection0.00100.061410.0010
Mysqli_queries1.433492.12221970.0073
Looping result0.00240.15611950.0000
Template Total1.513197.220.7566
Template load0.00250.162220.0013
Template processing1.510697.084120.7553
Template load and register function0.00030.018210.0003
states
state_id_array0.00100.066810.0010
state_identifier_array0.00080.054020.0004
Override
Cache load0.00210.1355430.0000
Sytem overhead
Fetch class attribute can translate value0.00190.124130.0006
Fetch class attribute name0.00180.113640.0004
XML
Image XML parsing0.00070.044730.0002
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.02891.8589210.0014
String conversion0.00000.000630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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