Welcome Guest, Not a member yet? Register   Sign In
Using language in a helper
#1

[eluser]MikeeJay[/eluser]
Hello,

How can I use the language files i a HELPER?

Normally I user $this->lang->line('blabla'), but since helpers are not classes I can't use that. Is there any native CI methods to do this, or should I simply check what language is used and include the lang files manually?
#2

[eluser]MikeeJay[/eluser]
Ahh, found it.
Code:
$CI = & get_instance();
$CI->lang->line('blabla');
#3

[eluser]GSV Sleeper Service[/eluser]
you'll have to use something like
Code:
$CI =& get_instance();
$CI->lang->load('curses','swahili');
...
#4

[eluser]wiredesignz[/eluser]
I submitted a language parser helper to the wiki (or was it Ignited Code) a while back, it may help you.

http://ellislab.com/forums/viewthread/76202/




Theme © iAndrew 2016 - Forum software by © MyBB