summaryrefslogtreecommitdiffstats
path: root/lib/private/l10n.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-04-15 15:12:25 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2014-04-15 15:12:25 +0200
commite125dc60cda3ad3bdbee1ebfc075669f5b808600 (patch)
tree1dbb922181bd9e15e9231312eae135343dcdb383 /lib/private/l10n.php
parent2eeab60378a3e22e19c4f435aa2bf65cc9da7c2a (diff)
downloadnextcloud-server-e125dc60cda3ad3bdbee1ebfc075669f5b808600.tar.gz
nextcloud-server-e125dc60cda3ad3bdbee1ebfc075669f5b808600.zip
introduce new function to force a language
Diffstat (limited to 'lib/private/l10n.php')
-rw-r--r--lib/private/l10n.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/l10n.php b/lib/private/l10n.php
index 175360e27a3..a397945b829 100644
--- a/lib/private/l10n.php
+++ b/lib/private/l10n.php
@@ -419,6 +419,14 @@ class OC_L10N implements \OCP\IL10N {
}
/**
+ * 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
* @returns string language