i18n

Author Message

Carlos Revillo

Tuesday 27 June 2006 7:38:09 am

hi. i have a "problem" with i18n operator.
i have two siteaccess. one is for french and the other one is for english.

In my settings/siteaccess/french/site.ini.append.php i have

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=eng-GB
...

while in my settings/settings/spanish/site.ini.append.php i have

[RegionalSettings]
Locale=esl-ES
ContentObjectLocale=esl-ES

Now i have modified translations.ts file. In share/translations/fre-FR/translations.ts i've added

<context>
    <name>menu</name>
    <message>
        <source>Home</source>
        <translation>Accueil</translation>
    </message>
</context>

share/translations/esl-ES/translations.ts i've added

<context>
    <name>menu</name>
    <message>
        <source>Home</source>
        <translation>Inicio</translation>
    </message>
</context>

Now i have a template file. In that file i have

{'Home'|i18n('menu')}

But the problem is I always get spanish translation of that string. Even if i am in the french siteaccess...
Btw, spanish is the main language of the site...

What can be wrong? Thanks.

Kristof Coomans

Tuesday 04 July 2006 3:18:14 am

Hello Carlos

Do you have <i>Locale=esl-ES</i> in settings/override/site.ini.append(.php) ?
Also try to clear all caches.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Carlos Revillo

Wednesday 05 July 2006 1:56:03 am

Yes. That was. I deleted that from my settings/override/site.ini.append.php and worked. thanks so much.

Kristof Coomans

Wednesday 05 July 2006 3:53:47 am

The locale setting in the global site.ini override has been reported as a bug: http://ez.no/bugs/view/8605

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Nicolas Ottavi

Thursday 06 July 2006 5:33:08 am

<b>[EDIT: Resolved, the problem was coming from my translation.ts file :( ]</b>

Hi I have the same problem. But I've nothing in the override/site.ini.append.php file concerning the translation.

The site is in 2 languages: French and English, french is the main language.

Here is the french/site.ini.append.php:

[RegionalSettings]
Locale=fre-FR
ContentObjectLocale=fre-FR
SiteLanguageList[]=fre-FR
TextTranslation=enabled
...
[ContentSettings]
TranslationList=eng-GB

And the english/site.ini.append.php

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
SiteLanguageList[]=eng-GB
SiteLanguageList[]=fre-FR
TextTranslation=enabled
...
[ContentSettings]
TranslationList=fre-FR

Thanks for your help,
Nicolas

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:34:38
Script start
Timing: Jan 31 2025 03:34:38
Module start 'layout'
Timing: Jan 31 2025 03:34:38
Module start 'content'
Timing: Jan 31 2025 03:34:39
Module end 'content'
Timing: Jan 31 2025 03:34:39
Script end

Main resources:

Total runtime1.1709 sec
Peak memory usage8,192.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 587.8828151.1797
Module start 'layout' 0.00580.0041 739.0625220.6328
Module start 'content' 0.00991.1601 959.69534,506.9219
Module end 'content' 1.17000.0009 5,466.617212.5313
Script end 1.1709  5,479.1484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3006160.0002
Check MTime0.00130.1130160.0001
Mysql Total
Database connection0.00080.068510.0008
Mysqli_queries1.068291.2228650.0164
Looping result0.00080.0713630.0000
Template Total1.104894.420.5524
Template load0.00190.158920.0009
Template processing1.102994.192320.5515
Template load and register function0.00160.139310.0016
states
state_id_array0.00190.165210.0019
state_identifier_array0.00280.235020.0014
Override
Cache load0.00150.1316380.0000
Sytem overhead
Fetch class attribute can translate value0.00180.150130.0006
Fetch class attribute name0.00260.224260.0004
XML
Image XML parsing0.00260.220430.0009
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00540.4613160.0003
String conversion0.00000.000640.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/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
7content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/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: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs