summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-02-07 11:04:37 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-07 11:04:37 +0100
commite5be2991019f1a6716d253596562f8ab0f4df008 (patch)
tree7c2bc48e1414be6a3bcdc0f420cc67c680f18c50 /lib/private
parentc688da7195755273f9b040dc9a16898686e6e68a (diff)
downloadnextcloud-server-e5be2991019f1a6716d253596562f8ab0f4df008.tar.gz
nextcloud-server-e5be2991019f1a6716d253596562f8ab0f4df008.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.php4
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)) {