mirror of
https://github.com/getgrav/grav.git
synced 2026-07-20 01:51:54 +02:00
add toggle for translations.fallback
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user