1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-12 08:04:05 +02:00

I18n: using static::locales array instead of array from config file

This commit is contained in:
Awilum
2018-03-27 03:35:18 +03:00
parent f38ef1500c
commit e7f15a7830
2 changed files with 1 additions and 3 deletions

View File

@@ -88,12 +88,11 @@ class I18n
// Get Plugins and Site Locales list
(array) $plugins_list = Config::get('site.plugins');
(array) $locales = Config::get('site.locales');
(array) $dictionary = [];
// Create dictionary
if (is_array($plugins_list) && count($plugins_list) > 0) {
foreach ($locales as $locale) {
foreach (static::$locales as $locale => $locale_title) {
foreach ($plugins_list as $plugin) {
$language_file = PLUGINS_PATH . '/' . $plugin . '/languages/' . $locale . '.yml';
if (file_exists($language_file)) {

View File

@@ -16,7 +16,6 @@ theme: default
plugins:
locale: "en"
locales: [en]
pages:
flush_cache: false