views:

172

answers:

1

Hi Friends,

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!!

+1  A: 

You need to load the language file you want to use before you grab lines from it:

$this->lang->load('filename', 'language');
mrinject