mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-14 10:43:56 -04:00
Fixed last item on the list which was to get the language selection working from the config area of the site versus having to change the language in the application/config/config.php file.
We're now at version 2.0! Tom git-svn-id: svn+ssh://jekkos@svn.code.sf.net/p/opensourcepos/code/@55 c3eb156b-1dc0-44e1-88ae-e38439141b53
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
|
||||
|
|
||||
*/
|
||||
$config['application_version'] = '2.0_RC8';
|
||||
$config['application_version'] = '2.0';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
@@ -10,7 +10,14 @@ function load_config()
|
||||
|
||||
if ($CI->config->item('language'))
|
||||
{
|
||||
//$CI->lang->switch_to($CI->config->item('language'));
|
||||
$CI->config->set_item( 'language', $CI->config->item( 'language' ) );
|
||||
$loaded = $CI->lang->is_loaded;
|
||||
$CI->lang->is_loaded = array();
|
||||
|
||||
foreach($loaded as $file)
|
||||
{
|
||||
$CI->lang->load( str_replace( '_lang.php', '', $file ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ($CI->config->item('timezone'))
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
class MY_Language extends CI_Language
|
||||
{
|
||||
function MY_Language()
|
||||
{
|
||||
parent::CI_Language();
|
||||
}
|
||||
|
||||
function switch_to($idiom)
|
||||
{
|
||||
$CI =& get_instance();
|
||||
if(is_string($idiom))
|
||||
{
|
||||
$CI->config->set_item('language',$idiom);
|
||||
$loaded = $this->is_loaded;
|
||||
$this->is_loaded = array();
|
||||
|
||||
foreach($loaded as $file)
|
||||
{
|
||||
$this->load(str_replace('_lang.php','',$file));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user