Welcome Guest, Not a member yet? Register   Sign In
routes and multi-language
#4

[eluser]hydevision[/eluser]
If anybody is interested. I've come up with the following solution:

The path to my admin section is set in config.php. Now I include the MY_Language library and I've added some checks in top of the library. If the checks are met than it will load the library and adds the language abbr to the url.

Like this:

Code:
class MY_Language extends CI_Language {
    
    function MY_Language()
    {
        global $RTR;
        
        $index_page        = $RTR->config->item('index_page');
        $lang_uri_abbr    = $RTR->config->item('lang_uri_abbr');
        $lang_db_abbr = $RTR->config->item('lang_db_abbr');
        $multi_lang = $RTR->config->item('multi_lang');
        $admin_path = $RTR->config->item('admin_path');
        $admin_uri = $RTR->uri->segment(1, '');
        
        if ($multi_lang == TRUE AND $admin_path != $admin_uri)
        {
        //-> continue function
        }


Messages In This Thread
routes and multi-language - by El Forum - 10-02-2010, 02:27 AM
routes and multi-language - by El Forum - 10-02-2010, 04:22 AM
routes and multi-language - by El Forum - 10-03-2010, 12:52 AM
routes and multi-language - by El Forum - 10-03-2010, 02:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB