From e172f5c82df0ee78657ed9aee1e27f15ea8b8168 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 6 Jul 2015 21:20:15 -0600 Subject: [PATCH] add toggle for translations.fallback --- system/src/Grav/Common/Language.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/system/src/Grav/Common/Language.php b/system/src/Grav/Common/Language.php index c1dfbc8fd..5dd4d5b04 100644 --- a/system/src/Grav/Common/Language.php +++ b/system/src/Grav/Common/Language.php @@ -248,6 +248,13 @@ class Language $lookup = array_shift($args); if ($this->enabled() && $lookup) { + + if ($this->config->get('system.languages.translations.fallback', true)) { + $languages = $this->getFallbackLanguages(); + } else { + $languages = (array) $this->getDefault(); + } + foreach ($this->getFallbackLanguages() as $lang) { $translation = $this->getTranslation($lang, $lookup);