Remember language Setting

Author Message

Frank Mueller

Monday 12 September 2005 5:47:18 am

Hi Folks,

i setup a Page using an ezPublish 3rd Generation.

Everything works including multiple Language Support (english and german) but the problem is that the user have to press the link for the english translation for every page he visit.

I thought that the actual locale will be stored in a session or something similar so a user who pressed english once would get the entire page in english (as long as there are english nodes).

The function i use is out of an example i think:
{* 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('eng-GB','English','ger-DE','Deutsch')
all_translations=$node.object.current.translation_list}
{section show=$all_translations|count|gt(0)}
{section var=translation loop=$node.object.current.translation_list}
<div class="blank"><a href={concat($node.url_alias,'/(language)/',$translation.item.language_code)|ezurl}>{$languages[$translation.item.language_code]}</a></div>
{/section}
{/section}
{/let}

I can change the links in the navigation but this wont work with the links in the content (like Image Gallery).

BTW: is there an english translation.ts available which is fully translated ? (the one which was in the packade lack some translations e.g. "<source>Enter gallery</source>")

BTW2: in my share/translatons folde i only have a directory eng-US but i am using eng-GB als second locale (default is ger-DE) is there the mistake or isnt the translationfile for eng-GB in this directory ?

Kind regards
Frank

Salvatore Guarino

Monday 12 September 2005 7:13:51 am

Dear Frank,

a good idea to create a multilanguage site is to create a siteaccess for every language (es. www.mysite.com/en, www.mysite.com/it etc.) You can found a step by step guide here: http://ez.no/community/forum/install_configuration/i_really_need_a_step_by_step_guide_on_how_to_setup_a_multilingual_site

Bye,

Salvatore

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 20 2025 14:24:31
Script start
Timing: Jan 20 2025 14:24:31
Module start 'layout'
Timing: Jan 20 2025 14:24:31
Module start 'content'
Timing: Jan 20 2025 14:24:32
Module end 'content'
Timing: Jan 20 2025 14:24:32
Script end

Main resources:

Total runtime0.7819 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.1563152.6250
Module start 'layout' 0.00530.0028 741.781339.4453
Module start 'content' 0.00810.7725 781.2266500.0547
Module end 'content' 0.78060.0013 1,281.28138.1641
Script end 0.7819  1,289.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4282160.0002
Check MTime0.00130.1706160.0001
Mysql Total
Database connection0.00080.105510.0008
Mysqli_queries0.733993.8554540.0136
Looping result0.00050.0682520.0000
Template Total0.751896.120.3759
Template load0.00200.257220.0010
Template processing0.749795.887220.3749
Template load and register function0.00020.024110.0002
states
state_id_array0.00140.180010.0014
state_identifier_array0.00140.175220.0007
Override
Cache load0.00170.2144290.0001
Sytem overhead
Fetch class attribute can translate value0.00080.097220.0004
Fetch class attribute name0.00170.211130.0006
XML
Image XML parsing0.00240.302120.0012
class_abstraction
Instantiating content class attribute0.00000.001630.0000
General
dbfile0.00260.3329170.0002
String conversion0.00000.000940.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs