Translating strings in templates

Author Message

Alejandro Serrano

Wednesday 24 January 2007 3:28:43 am

Hi,
I'm trying to set up a multilingual site using eZ Publish 3.8 from another not multilingual site. I've managed to add everything and it works fine.
However, I've read that the usual approach to multilingual sites is to create a different siteaccess and a different set of templates for each of the "translated sites". I don't mind creating different siteaccesses, but I need templates to be in just one folder.
My question is: is there any way to mantain some kind of "central repository" of strings, so a template could make a call to obtain each string that it needs to work in the language the user has?

Thanks in advance,
Alejandro Serrano

Mark Marsiglio

Wednesday 24 January 2007 4:54:05 am

You will want to set the same design and database for each stieaccess. Just copy the settings to each language siteaccess, and all of them will use the same design and data.

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Xavier Dutoit

Wednesday 24 January 2007 4:54:36 am

Yes, create an extension with only translations in them (see the one under shared/translations) for the format.

then you use |i18n( template operator (all the standards templates use it).

X+

http://www.sydesy.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 31 2025 03:41:32
Script start
Timing: Jan 31 2025 03:41:32
Module start 'layout'
Timing: Jan 31 2025 03:41:32
Module start 'content'
Timing: Jan 31 2025 03:41:32
Module end 'content'
Timing: Jan 31 2025 03:41:32
Script end

Main resources:

Total runtime0.0249 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.1563151.2109
Module start 'layout' 0.00530.0045 739.3672220.6875
Module start 'content' 0.00980.0137 960.0547997.8047
Module end 'content' 0.02340.0014 1,957.859433.9922
Script end 0.0249  1,991.8516 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002610.4269140.0002
Check MTime0.00114.2282140.0001
Mysql Total
Database connection0.00083.367810.0008
Mysqli_queries0.00218.533930.0007
Looping result0.00000.075610.0000
Template Total0.00104.110.0010
Template load0.00083.231910.0008
Template processing0.00020.806810.0002
Override
Cache load0.00062.251910.0006
General
dbfile0.00197.740580.0002
String conversion0.00000.104340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs