CodeIgniter Forums
Language Class - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: Language Class (/showthread.php?tid=61338)



Language Class - scalar1 - 04-09-2015

I have upgraded my own cms from version 2.2 to version 3.
Under ver 2 i have in my constructor:

PHP Code:
$this->lang->load('upload''hebrew'); 

It works fine and I see the upload errors in hebrew.

In version 3 the error messages are taken from the english upload_lang.php in System and not from the hebrew file.

[Image: 09-04-2015%2016-29-47.png]

What am I doing wrong?


RE: Language Class - gadelat - 04-09-2015

Second parameter of load method in language class is useless since some of the CI 3.0 parts always do reloading of language file in language specified in your config. Form_validation is one of them. So if you need to change language for some files reliably, always change your config language beforehand like this
PHP Code:
$this->config->set_item('language''hebrew'); 
It has also additional benefit that you don't need to specify second parameter after that.