From 28535bd787cb5dc45fadf4dd92e24e418dd16c60 Mon Sep 17 00:00:00 2001 From: eldadfux Date: Thu, 24 Oct 2019 22:17:11 +0300 Subject: [PATCH] moved locales to config file --- app/config/locales.php | 46 +++++++++++++++++++++++++++++++++++++++++ app/init.php | 47 ++---------------------------------------- 2 files changed, 48 insertions(+), 45 deletions(-) create mode 100644 app/config/locales.php diff --git a/app/config/locales.php b/app/config/locales.php new file mode 100644 index 0000000000..559aab42a8 --- /dev/null +++ b/app/config/locales.php @@ -0,0 +1,46 @@ +getServer('_APP_ENV', App::ENV_TYPE_PRODUCTION); $domain = $request->getServer('HTTP_HOST', ''); $version = include __DIR__.'/../app/config/version.php'; $providers = include __DIR__.'/../app/config/providers.php'; // OAuth providers list +$locales = include __DIR__.'/../app/config/locales.php'; // OAuth providers list $collections = include __DIR__.'/../app/config/collections.php'; // OAuth providers list $redisHost = $request->getServer('_APP_REDIS_HOST', ''); $redisPort = $request->getServer('_APP_REDIS_PORT', ''); @@ -216,7 +173,7 @@ Locale::setLanguage('zh-tw', include __DIR__.'/config/locale/zh-tw.php'); Locale::setDefault('en'); -if (in_array($locale, APP_LOCALES)) { +if (in_array($locale, $locales)) { Locale::setDefault($locale); }