Multiple languages

Author Message

Philip K.

Tuesday 13 December 2005 7:48:30 am

Hi.

I created an article in my ezP in two different languages (German, English).
How can I switch the site so that the visitor can view the article in the different languages??

Linux is like a wigwam; no windows, now gates, and apache inside!

Philip K.

Tuesday 13 December 2005 8:21:37 am

OK, I found a solution - sometimes I should be more patient when searching for something in the forum :)

Here is a solution that works:

{* 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('cat-ES','Catalan',									'chi-CN', 'Chinese', 'cze-CZ', 'Czech', 'dan-DK','Danish', 'dut-NL','Dutch', 		'eng-CA','English (Canada)', 'eng-GB','English (United Kingdom)', 		'eng-US','English', 'esl-ES','Español', 'esl-MX','Castillan', 'fin-FI','Finnish', 'fre-CA','French (Canada)', 'fre-FR','Français', 'ger-DE','German (Germany)', 'hun-HU','Hungarian', 'ita-IT','Italian', 'nno-NO','Norwegian (Nynorsk)', 'nor-NO','Norwegian (Bokmal)', 'pol-PL','Polish', 'por-BR','Portuguese (Brasil)', 'por-MZ','Portuguese (Mozambique)', 'por-PT','Portuguese (Portugal)', 'rus-RU','Russian', 'swe-SE','Swedish')

all_translations=$node.object.current.translation_list}
	
{section show=$all_translations|count|gt(0)}
   {section var=translation loop=$node.object.current.translation_list}
       <a href={concat($node.url_alias,'/(language)/',$translation.item.language_code)|ezurl}>{$languages[$translation.item.language_code]}</a> | 
    {/section}
{/section}
	
{/let}

found here:
http://ez.no/products/ez_publish_cms/documentation/configuration/configuration/language_and_charset/how_to_setup_a_multilingual_site

Linux is like a wigwam; no windows, now gates, and apache inside!

Jorge estévez

Tuesday 13 December 2005 11:02:06 am

Ok, works great, I was looking for something like that..

BUT, wen I change to another node it goes back to the default language, There must be a way to "set" de default language to the one changed by the user so it keeps the currently selected language..

Do yo kwo how to do that? Or someone else could help with this issue..

thanks

Diseño Web Cuba
Web Design Cuba
www.elfosdesign.com

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:35:32
Script start
Timing: Jan 18 2025 22:35:32
Module start 'layout'
Timing: Jan 18 2025 22:35:32
Module start 'content'
Timing: Jan 18 2025 22:35:32
Module end 'content'
Timing: Jan 18 2025 22:35:32
Script end

Main resources:

Total runtime0.7321 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 588.9063152.6094
Module start 'layout' 0.00530.0034 741.515639.4141
Module start 'content' 0.00860.7221 780.9297538.4609
Module end 'content' 0.73070.0013 1,319.390612.1875
Script end 0.7321  1,331.5781 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4303160.0002
Check MTime0.00120.1685160.0001
Mysql Total
Database connection0.00060.076310.0006
Mysqli_queries0.685093.5665570.0120
Looping result0.00060.0785550.0000
Template Total0.702896.020.3514
Template load0.00220.307320.0011
Template processing0.700595.686020.3503
Template load and register function0.00010.013310.0001
states
state_id_array0.00080.106610.0008
state_identifier_array0.00100.142320.0005
Override
Cache load0.00190.2557190.0001
Sytem overhead
Fetch class attribute can translate value0.00050.069820.0003
Fetch class attribute name0.00160.218140.0004
XML
Image XML parsing0.00060.076020.0003
class_abstraction
Instantiating content class attribute0.00000.001350.0000
General
dbfile0.00080.1031160.0000
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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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/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: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs