From bb1890da9389b21e5e69e080e0d0586b10e30a87 Mon Sep 17 00:00:00 2001 From: Taras Machyshyn Date: Thu, 6 Mar 2014 12:23:12 +0200 Subject: [PATCH] added defaultLanguage to config --- .gitignore | 2 +- application/Espo/Core/Utils/I18n.php | 2 +- application/Espo/Core/defaults/config.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 4a3a59a7ca..57630f130b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,7 @@ data/logs/* data/cache/* data/upload/* data/preferences/* -application/config.php +data/config.php application/Espo/Resources/metadata/scopes/CustomTest.json application/Espo/Modules/Crm/Resources/metadata/scopes/CustomTest.json application/Espo/Resources/layouts/CustomTest/* diff --git a/application/Espo/Core/Utils/I18n.php b/application/Espo/Core/Utils/I18n.php index 6cf5ba8654..634f66f9cb 100644 --- a/application/Espo/Core/Utils/I18n.php +++ b/application/Espo/Core/Utils/I18n.php @@ -68,7 +68,7 @@ class I18n } if (empty($this->currentLanguage)) { - $this->currentLanguage = 'en_US'; + $this->currentLanguage = $this->getConfig()->get('defaultLanguage'); } return $this->currentLanguage; diff --git a/application/Espo/Core/defaults/config.php b/application/Espo/Core/defaults/config.php index cd3cef8696..d932df503a 100644 --- a/application/Espo/Core/defaults/config.php +++ b/application/Espo/Core/defaults/config.php @@ -24,6 +24,7 @@ return array ( 0 => 'USD', 1 => 'EUR', ), + 'defaultLanguage' => 'en_US', 'defaultCurrency' => 'USD', 'outboundEmailIsShared' => true, 'outboundEmailFromName' => 'EspoCRM',