From e7f15a7830ec75334fbc6c71209c089b2be879c4 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 27 Mar 2018 03:35:18 +0300 Subject: [PATCH] I18n: using static::locales array instead of array from config file --- flextype/I18n.php | 3 +-- site/config/site.yml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/flextype/I18n.php b/flextype/I18n.php index 9f73cfc0..f804a79a 100644 --- a/flextype/I18n.php +++ b/flextype/I18n.php @@ -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)) { diff --git a/site/config/site.yml b/site/config/site.yml index 7d83a7cd..94107bef 100755 --- a/site/config/site.yml +++ b/site/config/site.yml @@ -16,7 +16,6 @@ theme: default plugins: locale: "en" -locales: [en] pages: flush_cache: false