introduce new function to force a language

This commit is contained in:
Thomas Müller 2014-04-15 15:12:25 +02:00
parent 2eeab60378
commit e125dc60cd
1 changed files with 8 additions and 0 deletions

View File

@ -418,6 +418,14 @@ class OC_L10N implements \OCP\IL10N {
return $text[$lang];
}
/**
* The given language is forced to be used while executing the current request
* @param string $lang
*/
public static function forceLanguage($lang) {
self::$language = $lang;
}
/**
* @brief find the best language
* @param array|string $app details below