From b69ad58853f6e1fba958bb4072422232eaf6a339 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Thu, 21 Jan 2016 20:04:55 +0100 Subject: [PATCH] Refactored the language config setting. --- src/application/config/config.php | 13 +++- src/config-sample.php | 108 +++++++++++++++--------------- 2 files changed, 65 insertions(+), 56 deletions(-) diff --git a/src/application/config/config.php b/src/application/config/config.php index 589a3e38..18cc26d6 100644 --- a/src/application/config/config.php +++ b/src/application/config/config.php @@ -82,8 +82,19 @@ $config['url_suffix'] = ''; | than english. | */ -$config['language'] = Config::DEFAULT_LANGUAGE; // default language +$config['language'] = Config::LANGUAGE; // Default Language + +/* +|-------------------------------------------------------------------------- +| Available Languages +|-------------------------------------------------------------------------- +| +| Each item of this array must be a directory with the translation files in +| the /application/language directory. The users will be able to select one +| of these languages. +| +*/ $config['available_languages'] = array( 'english', 'german', diff --git a/src/config-sample.php b/src/config-sample.php index d69e9d9c..dd844cd6 100644 --- a/src/config-sample.php +++ b/src/config-sample.php @@ -1,55 +1,53 @@ - - * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis - * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 - * @link http://easyappointments.org - * @since v1.0.0 - * ---------------------------------------------------------------------------- */ - -/** - * Easy!Appointments Configuration File - * - * Set your installation BASE_URL * without the trailing slash * and the database - * credentials in order to connect to the database. You can enable the DEBUG_MODE - * while developing the application. - * - * IMPORTANT: - * If you are updating from version 1.0 you will have to create a new "config.php" - * file because the old "configuration.php" is not used anymore. - */ -class Config { - // ------------------------------------------------------------------------ - // General Settings - // ------------------------------------------------------------------------ - const BASE_URL = 'http://url-to-easyappointments-directory'; - const DEBUG_MODE = FALSE; - - // options: 'english','german','greek','hungarian','portuguese', - // 'chinese','dutch','french','japanese','polish','spanish','italian', - // 'danish','luxembourgish','slovak','finnish','russian','romanian', - // 'turkish','hindi' - const DEFAULT_LANGUAGE = english; - - // ------------------------------------------------------------------------ - // Database Settings - // ------------------------------------------------------------------------ - const DB_HOST = ''; - const DB_NAME = ''; - const DB_USERNAME = ''; - const DB_PASSWORD = ''; - - // ------------------------------------------------------------------------ - // Google Calendar Sync - // ------------------------------------------------------------------------ - const GOOGLE_SYNC_FEATURE = FALSE; // Enter TRUE or FALSE - const GOOGLE_PRODUCT_NAME = ''; - const GOOGLE_CLIENT_ID = ''; - const GOOGLE_CLIENT_SECRET = ''; - const GOOGLE_API_KEY = ''; -} -/* End of file config.php */ -/* Location: ./config.php */ + + * @copyright Copyright (c) 2013 - 2016, Alex Tselegidis + * @license http://opensource.org/licenses/GPL-3.0 - GPLv3 + * @link http://easyappointments.org + * @since v1.0.0 + * ---------------------------------------------------------------------------- */ + +/** + * Easy!Appointments Configuration File + * + * Set your installation BASE_URL * without the trailing slash * and the database + * credentials in order to connect to the database. You can enable the DEBUG_MODE + * while developing the application. + * + * Set the default language by changing the LANGUAGE constant. For a full list of + * available languages look at the /application/config/config.php file. + * + * IMPORTANT: + * If you are updating from version 1.0 you will have to create a new "config.php" + * file because the old "configuration.php" is not used anymore. + */ +class Config { + // ------------------------------------------------------------------------ + // General Settings + // ------------------------------------------------------------------------ + const BASE_URL = 'http://url-to-easyappointments-directory'; + const LANGUAGE = 'english'; + const DEBUG_MODE = FALSE; + + // ------------------------------------------------------------------------ + // Database Settings + // ------------------------------------------------------------------------ + const DB_HOST = ''; + const DB_NAME = ''; + const DB_USERNAME = ''; + const DB_PASSWORD = ''; + + // ------------------------------------------------------------------------ + // Google Calendar Sync + // ------------------------------------------------------------------------ + const GOOGLE_SYNC_FEATURE = FALSE; // Enter TRUE or FALSE + const GOOGLE_PRODUCT_NAME = ''; + const GOOGLE_CLIENT_ID = ''; + const GOOGLE_CLIENT_SECRET = ''; + const GOOGLE_API_KEY = ''; +} +/* End of file config.php */ +/* Location: ./config.php */