mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 02:46:04 +01:00
Correctly set the default language when not set in the user yaml (fixes language not changing problem)
This commit is contained in:
@@ -684,14 +684,12 @@ class Admin
|
||||
}
|
||||
|
||||
if ($lookup) {
|
||||
if (empty($languages)) {
|
||||
if (empty($languages) || reset($languages) == null) {
|
||||
if ($this->grav['config']->get('system.languages.translations_fallback', true)) {
|
||||
$languages = $this->grav['language']->getFallbackLanguages();
|
||||
} else {
|
||||
$languages = (array)$this->grav['language']->getDefault();
|
||||
}
|
||||
} else {
|
||||
$languages = ['en'];
|
||||
}
|
||||
} else {
|
||||
$languages = ['en'];
|
||||
|
||||
Reference in New Issue
Block a user