diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-07 11:04:37 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-05 19:44:54 +0100 |
commit | 34671d6ad43b79ec5b4165a98b50ccc8506c2371 (patch) | |
tree | 7836db9b617c2456f04819b835ffa3403a4da02a /lib/private | |
parent | 655e39ffcd41b1341f436272a80786f21f69c5b6 (diff) | |
download | nextcloud-server-34671d6ad43b79ec5b4165a98b50ccc8506c2371.tar.gz nextcloud-server-34671d6ad43b79ec5b4165a98b50ccc8506c2371.zip |
Use proper lanugage in langauge code
Fixes #8180
The _ is not valid in language codes use - instead.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/TemplateLayout.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 3acdae0e395..d37a8bbabbe 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -128,7 +128,9 @@ class TemplateLayout extends \OC_Template { } // Send the language to our layouts - $this->assign('language', \OC::$server->getL10NFactory()->findLanguage()); + $lang = \OC::$server->getL10NFactory()->findLanguage(); + $lang = str_replace('_', '-', $lang); + $this->assign('language', $lang); if(\OC::$server->getSystemConfig()->getValue('installed', false)) { if (empty(self::$versionHash)) { |