Fallback to default lang if no string is found

This commit is contained in:
Flavio Copes
2015-08-24 19:09:07 +02:00
parent 1676fd570b
commit cdb4d2b7f4
2 changed files with 5 additions and 1 deletions

View File

@@ -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);