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

View File

@@ -1277,4 +1277,4 @@ de:
SAVE_AS: Save as
MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC: Are you sure you want to delete this page and all it's children? If the page is translated in other languages, those translations will be kept and must be deleted separately. This action cannot be undone.
AND: und
UPDATE_AVAILABLE: Update available
UPDATE_AVAILABLE: Aktualisierung verfügbar