mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
introduce new function to force a language
This commit is contained in:
parent
2eeab60378
commit
e125dc60cd
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue