• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Language Class

#1
Photo 
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?
Reply

#2
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.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.