CodeIgniter icon indicating copy to clipboard operation
CodeIgniter copied to clipboard

Language Class Bug (alternative path)

Open hamad-almamari opened this issue 10 years ago • 1 comments

Hello ,

I think there is bug in Language Class u can test that > when u use alternative path @ parm.

This give u error > file not found: $this->lang->load('test','english', FALSE , FALSE ,'my_lang_folder_in_root');

my site files .

application/...
system/..
my_lang_folder/english/test.php
index.php

But when u change this line in Language Class evrything will be OK.>>

        if ($alt_path !== '')
        {
            $alt_path .= 'language/'.$idiom.'/'.$langfile;
            if (file_exists($alt_path))
            {
                include($alt_path);
                $found = TRUE;
            }
        }

TO

        if ($alt_path !== '')
        {
            $alt_path .= '/'.$idiom.'/'.$langfile;
            if (file_exists($alt_path))
            {
                include($alt_path);
                $found = TRUE;
            }
        }

Fix that :+1:

hamad-almamari avatar Apr 20 '16 18:04 hamad-almamari

This is the intended behavior, not a bug.

narfbg avatar Apr 20 '16 20:04 narfbg