diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-07 13:04:37 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-07 13:04:37 +0300 |
commit | e5be2991019f1a6716d253596562f8ab0f4df008 (patch) | |
tree | 7c2bc48e1414be6a3bcdc0f420cc67c680f18c50 /lib | |
parent | c688da7195755273f9b040dc9a16898686e6e68a (diff) |
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')
-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)) { |