frameworks - Codeigniter get keys of language-files -
I'm running here in an I18N-problem.
I have a database in which several variables have been stored. (Ec mod_sales )
To enable I18N-my site, I have a language-file of the language-file (ec $ The-> long-> line (' Mod_sales'); ).
This will return the value of that language-variable from the language-file
(ec $ lang ['mod_sales'] = "sales"; ) or in German ( $ lang ['mod_sales'] = "workoff" )
There is a problem here now: I am trying to reverse the process so that key-value can be found Say lang-array that I'm driving my site in German and searching for "workoff", I want to get "mode_sales" - just like that He runs into me and discover the "sale".
Is there any implementation method to get there, or do I have to handle it by array-function (if that is also possible)?
I found out (with the help of CI-friends from #Comigniter):
< P> I can use the array using $ var = $ the-> lang-> language.Now I can use the array_search ("val", $ var); To get the key to that value
Comments
Post a Comment