Index: kernel/common/i18n.php
===================================================================
--- kernel/common/i18n.php	(revision 22598)
+++ kernel/common/i18n.php	(working copy)
@@ -31,8 +31,7 @@
 */
 function ezcurrentLanguage()
 {
-    $locale = eZLocale::instance();
-    return $locale->translationCode();
+    return eZLocale::instance()->translationCode();
 }
 
 /*!
@@ -68,54 +67,8 @@
  will only return the source text.
 */
 $ini = eZINI::instance();
-$useTextTranslation = false;
-$hasFallback = false;
-if ( $ini->variable( 'RegionalSettings', 'TextTranslation' ) != 'disabled' )
-{
-    $language = ezcurrentLanguage();
-    $iniI18N = eZINI::instance( "i18n.ini" );
-    $fallbacks = $iniI18N->variable( 'TranslationSettings', 'FallbackLanguages' );
+$useTextTranslation = $ini->variable( 'RegionalSettings', 'TextTranslation' ) != 'disabled';
 
-    $extensionBase = eZExtension::baseDirectory();
-    $translationExtensions = $ini->variable( 'RegionalSettings', 'TranslationExtensions' );
-
-    if ( array_key_exists( $language,  $fallbacks ) and $fallbacks[$language] )
-    {
-        if ( file_exists( 'share/translations/' . $fallbacks[$language] . '/translation.ts' ) )
-        {
-            $hasFallback = true;
-        }
-        else
-        {
-            foreach ( $translationExtensions as $translationExtension )
-            {
-                $extensionPath = $extensionBase . '/' . $translationExtension . '/translations/' . $fallbacks[$language] . '/translation.ts';
-                if ( file_exists( $extensionPath ) )
-                {
-                    $hasFallback = true;
-                    break;
-                }
-            }
-        }
-    }
-    if ( file_exists( 'share/translations/' . $language . '/translation.ts' ) || $hasFallback )
-    {
-        $useTextTranslation = true;
-    }
-    else
-    {
-        foreach ( $translationExtensions as $translationExtension )
-        {
-            $extensionPath = $extensionBase . '/' . $translationExtension . '/translations/' . $language . '/translation.ts';
-            if ( file_exists( $extensionPath ) )
-            {
-                $useTextTranslation = true;
-                break;
-            }
-        }
-    }
-}
-
 if ( $useTextTranslation || eZTranslatorManager::dynamicTranslationsEnabled() )
 {
     function ezi18n( $context, $source, $comment = null, $arguments = null )
@@ -130,21 +83,16 @@
 
     function eZTranslateText( $context, $source, $comment = null, $arguments = null )
     {
-        $ini = eZINI::instance();
-        if ( $ini->variable( 'RegionalSettings', 'Locale' ) == 'eng-GB' )
+        $language = eZLocale::instance()->translationCode();
+        if ( $language == 'eng-GB' )
         {
             // we don't have ts-file for 'eng-GB'.
-            // NOTE: don't remove this 'if'. it's needed to support dynamic switch between translations.
             return ezinsertarguments( $source, $arguments );
         }
 
-        $language = ezcurrentLanguage();
-
-        $file = 'translation.ts';
-
-        // translation.ts translation
+        $ini = eZINI::instance();
         $useCache = $ini->variable( 'RegionalSettings', 'TranslationCache' ) != 'disabled';
-        eZTSTranslator::initialize( $context, $language, $file, $useCache );
+        eZTSTranslator::initialize( $context, $language, 'translation.ts', $useCache );
 
         // Bork translation: Makes it easy to see what is not translated.
         // If no translation is found in the eZTSTranslator, a Bork translation will be returned.
