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>
This commit is contained in:
Roeland Jago Douma 2018-02-07 11:04:37 +01:00
parent 655e39ffcd
commit 34671d6ad4
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ class TemplateLayout extends \OC_Template {
} }
// Send the language to our layouts // 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(\OC::$server->getSystemConfig()->getValue('installed', false)) {
if (empty(self::$versionHash)) { if (empty(self::$versionHash)) {