Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[IMP] Added default language support feature
  • Loading branch information
smrdoshi committed Feb 19, 2018
1 parent 3a078d0 commit 6055c85
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web_interface/astpp/application/config/config.php
Expand Up @@ -76,7 +76,7 @@
* | than english.
* |
*/
$config ['language'] = 'en_EN';
$config ['language'] = 'english';

/*
* |--------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions web_interface/astpp/application/config/constants.php
Expand Up @@ -112,5 +112,8 @@
define ( 'LOCALE_REQUEST_PARAM', 'lang' );
define ( 'WEBSITE_DOMAIN', 'messages' );

//Define default language
define ('DEFAULT_LANGUAGE','en_EN');

/* End of file constants.php */
/* Location: ./application/config/constants.php */
2 changes: 1 addition & 1 deletion web_interface/astpp/application/libraries/locale.php
Expand Up @@ -39,7 +39,7 @@ function set_lang($lang = FALSE) {
$current_locale = $this->CI->session->userdata ( 'user_language' );
if (empty ( $current_locale )) {
//$current_locale = 'en_US';
$current_locale = config_item('language');
$current_locale = DEFAULT_LANGUAGE;
}
putenv ( "LANG=$current_locale" );
//setlocale ( LC_ALL, $current_locale . ".UTF-8" );
Expand Down

0 comments on commit 6055c85

Please sign in to comment.