Reputation: 6064
How can I access my lang variables in controller?
function index()
{
$seo_title = $this->lang->line('blablabla');
$data['page_title'] = $seo_title;
$this->load->view('contact/index.php',$data);
}
in my lang file blablabla has string in, and it works well when I call from view file. but when I want to call from controller, it doesnt return anything :(
any idea about problem? appreciate!!
Upvotes: 1
Views: 1539
Reputation: 5686
You need to load the language file you want to use before you grab lines from it:
$this->lang->load('filename', 'language');
Upvotes: 4