eZTSTranslator::loadTranslationFile problem

Author Message

Nicolas Jessel

Friday 04 June 2010 6:55:22 am

Hello,

I've a multi-language site, eng-GB, ar-TN and fre-FR.

The original language is fre-FR and I want to have .ts file for static elements in eng-GB and ar-TN.

In site.ini for each siteaccess, I've, by example for eng-GB:

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
SiteLanguageList[]=eng-GB
SiteLanguageList[]=fre-FR
SiteLanguageList[]=ar-TN
TextTranslation=enabled

In ar-TN, translation.ts is loaded and translations are OK but in english, my translation file is not loaded and I don't know why????

Any solutions, please.

Thanks,

Nicolas

Abdelkader RHOUATI

Friday 04 June 2010 9:34:31 am

Hi,

Translation of static texte in eng-GB does'n work.

English is regarded as the language used in template, so the static texte should be in English, and not need a translation.

Moreover, I never understood this ..

Otherwise, if you're early in your development we must do everything in English, and translate the fre-FR and ar-TN.
Otherwise, you can make a patch of file: kernel/common/ezi18noperator.php

changes the line 131 and removes the requirement "if":

 if ( $language! = 'eng-GB' ) //eng-GB Does not Need  translation
 { 
    ...
  }

Thank you

By

Abdelkader RHOUATI

Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery

Nicolas Jessel

Monday 07 June 2010 1:03:30 am

Hello Abdelkader,

Thanks a lot for your answer.

For this to work completely on version 4.3, you must comment on the block "if" at line 116 of file kernel/common/ezpi18n.php

if ( $localeCode == 'eng-GB' )
 {
     // we don't have ts-file for 'eng-GB'.
     return self::insertArguments( $source, $arguments );
 }

This is due to the fact that the functions of translations have changed in this version of eZ.

Thanks again,

Best Regards.

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 18 2025 02:44:34
Script start
Timing: Jan 18 2025 02:44:34
Module start 'layout'
Timing: Jan 18 2025 02:44:34
Module start 'content'
Timing: Jan 18 2025 02:44:34
Module end 'content'
Timing: Jan 18 2025 02:44:34
Script end

Main resources:

Total runtime0.0127 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1641152.6563
Module start 'layout' 0.00500.0021 740.820339.4922
Module start 'content' 0.00710.0038 780.312589.5078
Module end 'content' 0.01090.0017 869.820334.3047
Script end 0.0126  904.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002318.5740140.0002
Check MTime0.00107.7557140.0001
Mysql Total
Database connection0.00075.652310.0007
Mysqli_queries0.002015.628230.0007
Looping result0.00000.071610.0000
Template Total0.001411.410.0014
Template load0.00086.070710.0008
Template processing0.00075.326210.0007
Override
Cache load0.00064.365010.0006
General
dbfile0.00021.833880.0000
String conversion0.00000.045240.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