introduce new function to force a language
This commit is contained in:
parent
2eeab60378
commit
e125dc60cd
|
@ -418,6 +418,14 @@ class OC_L10N implements \OCP\IL10N {
|
||||||
return $text[$lang];
|
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
|
* @brief find the best language
|
||||||
* @param array|string $app details below
|
* @param array|string $app details below
|
||||||
|
|
Loading…
Reference in New Issue