Add array support in admin lang strings

This commit is contained in:
Andy Miller
2019-01-25 12:25:22 -07:00
parent 4d58b3739c
commit 94254b5c6f
2 changed files with 4 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
* Removed `tabs`, `tab`, and `toggle` fields as they are now in Form plugin
* Fix issue with new page always showing modular page templates [#1573](https://github.com/getgrav/grav-plugin-admin/issues/1573)
* Fixed issue deleting files in plugins/themes/config
* Fixed array support in admin languages, e.g. `DAYS_OF_THE_WEEK`
# v1.9.0-beta.7
## 12/14/2018

View File

@@ -541,16 +541,16 @@ class Admin
}
foreach ((array)$languages as $lang) {
$translation = $grav['language']->getTranslation($lang, $lookup);
$translation = $grav['language']->getTranslation($lang, $lookup, true);
if (!$translation) {
$language = $grav['language']->getDefault() ?: 'en';
$translation = $grav['language']->getTranslation($language, $lookup);
$translation = $grav['language']->getTranslation($language, $lookup, true);
}
if (!$translation) {
$language = 'en';
$translation = $grav['language']->getTranslation($language, $lookup);
$translation = $grav['language']->getTranslation($language, $lookup, true);
}
if ($translation) {