CodeIgniter Languages : What is the best way?

zgillis

New Member
i recently start using CodeIgniter as PHP MVC FrameWork , before CodeIgniter, i was using my own small implementation of MVC Pattern , So , i was using language system build on constants like :\[code\]define( CONTACT_US , ' Contact Us ' );\[/code\] and so ... , but when i start using CodeIgniter , i see it use Language Class , so if we need to use a language in a view we need first to declare it like \[code\]$lang['mainpage_contact'] = "Contact Us";\[/code\] , when we need to pass it to view , \[code\]$this->lang->load('mainpage' ); $date['contact'] = $this->lang->line('mainpage_contact');\[/code\]and then pass it to view , in the first way , we can just define the constant and load the file , then use it directly in the view ... what is the best way ?
 
Back
Top