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

I seem to be having difficulties with the language class. I'm sure I'm doing something wrong, could someone please shed some light?

I am creating a site that requires multiple languages. When I use this command: $this->lang->load('myfile', 'english'); (from my controller) it echoes the entire content of "myfile" at the top if the screen. I then use echo $this->lang->line("my_key"); - it echoes nothing at all.

'myfile' is set up like this:

myfile_lang.php is located in the system/application/language/english folder. The contents of 'myfile' is simply:

$lang['my_key'] = "Hello";

The version of CI that I am using:
// CI Version
define('APPVER', '1.5.3');

What am I doing wrong here?

Application-specific _lang files should go in application/language/. If you do so, upgrading to new versions of CI is easier because you can replace the system directory to upgrade the framework core.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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