From 018c22e7e9bebb1dcf5a0d83b537129efc9d8630 Mon Sep 17 00:00:00 2001 From: Flavio Copes Date: Mon, 30 Nov 2015 16:10:54 +0100 Subject: [PATCH] Fix getting strings translated when the default lang is != 'en' and does not contain them --- classes/admin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/admin.php b/classes/admin.php index fa94e446..3bbe45e4 100644 --- a/classes/admin.php +++ b/classes/admin.php @@ -814,6 +814,11 @@ class Admin $translation = $this->grav['language']->getTranslation($language, $lookup, $array_support); } + if (!$translation) { + $language = 'en'; + $translation = $this->grav['language']->getTranslation($language, $lookup, $array_support); + } + if ($translation) { if (count($args) >= 1) { return vsprintf($translation, $args);