mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-04 14:50:59 +01:00
Fallback to default lang if no string is found
This commit is contained in:
@@ -716,6 +716,10 @@ class Admin
|
||||
foreach ((array)$languages as $lang) {
|
||||
$translation = $this->grav['language']->getTranslation($lang, $lookup, $array_support);
|
||||
|
||||
if (!$translation) {
|
||||
$translation = $this->grav['language']->getTranslation($this->grav['language']->getDefault(), $lookup, $array_support);
|
||||
}
|
||||
|
||||
if ($translation) {
|
||||
if (count($args) >= 1) {
|
||||
return vsprintf($translation, $args);
|
||||
|
||||
Reference in New Issue
Block a user