Welcome Guest, Not a member yet? Register   Sign In
CI core language
#1

[eluser]sl3dg3hamm3r[/eluser]
Hello there

I hope I will get some answers with a new topic about this issue. I'm still seeking for a possibility to change CI's core language file path (./system/language/[language]/) during run time. I still couldn't figure out where and how this information is stored.

Xwero posted once a solution, which doesn't work (I guess due to newer CI version):
Code:
$CI =& get_instance();
if($lang != $CI->config->item('language'))
{
    $CI->config->set_item('language',$lang);
    $loaded = $CI->config->is_loaded;
    $CI->config->is_loaded = array();
            
    foreach($loaded as $file)
    {
        $CI->config->load(str_replace('_lang.php','',$file));    
    }
}

The array is_loaded is simply empty, nothing to change there. I'm a little bit suprised that CI doesn't offer any function to change the language path during run time?!? I'd say this is quite essential if you want to offer different languages on your web-page.

I searched already through all CI-files after 'language' (as it is defined in the config), but couldn't find any place where this would be called and set...

I'd appreciate any input to the right path...
sl3dg3


Messages In This Thread
CI core language - by El Forum - 07-08-2009, 03:06 AM
CI core language - by El Forum - 07-09-2009, 06:22 AM
CI core language - by El Forum - 07-09-2009, 06:37 AM
CI core language - by El Forum - 07-09-2009, 06:58 AM
CI core language - by El Forum - 07-09-2009, 08:43 AM
CI core language - by El Forum - 07-12-2009, 11:10 AM
CI core language - by El Forum - 07-13-2009, 01:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB