diff --git a/kernel/common/ezi18noperator.php b/kernel/common/ezi18noperator.php index ac24e18dd15..ed9b0278fc8 100644 --- a/kernel/common/ezi18noperator.php +++ b/kernel/common/ezi18noperator.php @@ -116,7 +116,7 @@ function i18nTrans( $operatorName, &$node, $tpl, &$resourceData, if ( $ini->variable( 'RegionalSettings', 'TextTranslation' ) != 'disabled' ) { $language = eZLocale::instance()->localeFullCode(); - if ( $language != "eng-GB" ) // eng-GB does not need translation + if ( $language != $ini->variable( 'RegionalSettings', 'Basei18nLocale' ) ) { $file = 'translation.ts'; $ini = eZINI::instance(); diff --git a/kernel/common/ezpi18n.php b/kernel/common/ezpi18n.php index f5b31776991..26a7808ed49 100644 --- a/kernel/common/ezpi18n.php +++ b/kernel/common/ezpi18n.php @@ -93,14 +93,13 @@ public static function tr( $context, $source, $comment = null, $arguments = null */ protected static function translateText( $context, $source, $comment = null, $arguments = null ) { + $ini = eZINI::instance(); $localeCode = eZLocale::instance()->localeFullCode(); - if ( $localeCode == 'eng-GB' ) + if ( $localeCode == $ini->variable( 'RegionalSettings', 'Basei18nLocale' ) ) { - // we don't have ts-file for 'eng-GB'. return self::insertArguments( $source, $arguments ); } - $ini = eZINI::instance(); $useCache = $ini->variable( 'RegionalSettings', 'TranslationCache' ) != 'disabled'; eZTSTranslator::initialize( $context, $localeCode, 'translation.ts', $useCache ); diff --git a/settings/site.ini b/settings/site.ini index 278c82c9d55..edf2de077fa 100755 --- a/settings/site.ini +++ b/settings/site.ini @@ -864,6 +864,9 @@ OverrideSiteDesign=standard [RegionalSettings] # The locale for your site Locale=eng-GB +# Text will not be translated with i18n operator on base i18n locale +# Leave empty if you want to use i18n translation on every locale +Basei18nLocale=eng-GB # Set this if the http locale in the locale is wrong HTTPLocale= # Set this if you want to run the entire PHP system in a given