Language class problem: Undefined property: CI_Language::$line - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Language class problem: Undefined property: CI_Language::$line (/showthread.php?tid=6736) |
Language class problem: Undefined property: CI_Language::$line - El Forum - 03-10-2008 [eluser]stef25[/eluser] I'm having some problems getting the language class to work. I have a folder system/language/dutch in which is a file called test_lang.php My url is: example.com/index.php/mailer/index/12345/nl My controller is: Code: class Mailer extends Controller { My Dutch language file then contains: Code: //Navigation tabs, from left to right Now, when i visit example.com/index.php/mailer/index/12345/nl my view loads fine, but I get errors for each of the three language elements I try to load: Undefined property: CI_Language::$line My view contains: Code: echo $data['tab_left']; Can anyone spot what am I missing? Language class problem: Undefined property: CI_Language::$line - El Forum - 03-10-2008 [eluser]xwero[/eluser] Code: $data['tab_right'] = $this->lang->line['kt_nav_tab_3']; Code: $data['tab_right'] = $this->lang->line('kt_nav_tab_3'); Language class problem: Undefined property: CI_Language::$line - El Forum - 03-10-2008 [eluser]stef25[/eluser] thanks! that fixes that problem. now I'm getting an error in my view that says "Undefined variable: data", for all 3 times i try to echo: Code: echo $data['tab_left']; I passed the $data to the view using Code: $this->load->view('index', $data); what would cause that? Language class problem: Undefined property: CI_Language::$line - El Forum - 03-10-2008 [eluser]stef25[/eluser] ok fixed it - http://ellislab.com/forums/viewthread/71583/. i need to echo $tab_left, not $data['tab_left'] thanks again for super fast reply! |