Browse Source

Saving api_get_language_interface() in an $app key

Julio Montoya 12 years ago
parent
commit
2d508aca90
1 changed files with 3 additions and 5 deletions
  1. 3 5
      main/inc/lib/internationalization.lib.php

+ 3 - 5
main/inc/lib/internationalization.lib.php

@@ -138,11 +138,9 @@ function get_lang($variable, $reserved = null, $language = null)
         }
     }
     return $translated;*/
-    $language_interface = api_get_language_interface();
-    /*$helo = false;
-    if ($variable == 'LostPassword') {
-        $helo = true;
-    }*/
+    global $app;
+    $language_interface = isset($app['language_interface']) ? $app['language_interface'] : api_get_language_interface();
+
     global
     // For serving some old hacks:
     // By manipulating this global variable the translation may be done in different languages too (not the elegant way).