Forums / General / i18n

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

eZ debug

Timing: Jan 18 2025 15:15:42
Script start
Timing: Jan 18 2025 15:15:42
Module start 'content'
Timing: Jan 18 2025 15:15:42
Module end 'content'
Timing: Jan 18 2025 15:15:42
Script end

Main resources:

Total runtime0.1504 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0143 587.4688180.8672
Module start 'content' 0.01430.0048 768.335997.8828
Module end 'content' 0.01900.1313 866.2188527.6719
Script end 0.1504  1,393.8906 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.4094200.0002
Check MTime0.00161.0365200.0001
Mysql Total
Database connection0.00090.628910.0009
Mysqli_queries0.103068.50651410.0007
Looping result0.00110.71521390.0000
Template Total0.130987.110.1309
Template load0.00090.591710.0009
Template processing0.130186.460810.1301
Override
Cache load0.00060.394410.0006
Sytem overhead
Fetch class attribute can translate value0.00070.452110.0007
XML
Image XML parsing0.00030.176310.0003
General
dbfile0.00271.7645200.0001
String conversion0.00000.003330.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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