Changed language folder names

This commit is contained in:
Visman 2018-08-15 22:40:57 +07:00
parent a9241d0385
commit fa3174ed4c
93 changed files with 9 additions and 9 deletions

View file

@ -87,10 +87,10 @@ class Lang
$this->tr[$lang] = $this->arrayFromStr($file); $this->tr[$lang] = $this->arrayFromStr($file);
} }
$flag = false; $flag = false;
} elseif ($lang === 'English') { } elseif ($lang === 'en') {
$flag = false; $flag = false;
} }
$lang = 'English'; $lang = 'en';
} while ($flag); } while ($flag);
$this->loaded[$name][$lang] = true; $this->loaded[$name][$lang] = true;

View file

@ -111,14 +111,14 @@ class Model extends DataModel
{ {
$langs = $this->c->Func->getLangs(); $langs = $this->c->Func->getLangs();
$lang = $this->isGuest || empty($this->a['language']) || ! \in_array($this->a['language'], $langs) $lang = $this->isGuest || empty($this->a['language']) || ! isset($langs[$this->a['language']])
? $this->c->config->o_default_lang ? $this->c->config->o_default_lang
: $this->a['language']; : $this->a['language'];
if (\in_array($lang, $langs)) { if (isset($langs[$lang])) {
return $lang; return $lang;
} else { } else {
return isset($langs[0]) ? $langs[0] : 'English'; return \reset($langs) ?: 'en';
} }
} }
@ -131,14 +131,14 @@ class Model extends DataModel
{ {
$styles = $this->c->Func->getStyles(); $styles = $this->c->Func->getStyles();
$style = $this->isGuest || empty($this->a['style']) || ! \in_array($this->a['style'], $styles) $style = $this->isGuest || empty($this->a['style']) || ! isset($styles[$this->a['style']])
? $this->c->config->o_default_style ? $this->c->config->o_default_style
: $this->a['style']; : $this->a['style'];
if (\in_array($style, $styles)) { if (isset($styles[$style])) {
return $style; return $style;
} else { } else {
return isset($styles[0]) ? $styles[0] : 'ForkBB'; return \reset($styles) ?: 'ForkBB';
} }
} }

View file

@ -15,7 +15,7 @@ return [
], ],
'forConfig' => [ 'forConfig' => [
'o_default_lang' => 'English', 'o_default_lang' => 'en',
'o_default_style' => 'ForkBB', 'o_default_style' => 'ForkBB',
'o_redirect_delay' => 0, 'o_redirect_delay' => 0,
'o_date_format' => 'Y-m-d', 'o_date_format' => 'Y-m-d',