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.