CodeIgniter Forums
Using an multidimensional array in a language file - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Using an multidimensional array in a language file (/thread-10127.html)



Using an multidimensional array in a language file - El Forum - 07-19-2008

[eluser]dlange[/eluser]
Hello,

I have pulldownitem in my form and would like to translate the values coming from the database. My database looks like this:
Code:
#id        #country
1        abc
2        def
3        ghi
4        jkl
Now I would like to create a language file which translates the countrynames, something like this:
Code:
$lang['language_abc'] = 'translation of abc';
$lang['language_def'] = 'translation of def';
$lang['language_ghi'] = 'translation of ghi';
$lang['languge_jkl'] = 'translation of jkl';
This is my first project with Codeigniter and I have no idea if this is possible or if I have to customize the language library. Maybe you know a solution for this? (My suggestion doesn't seem to work).

Thanks,
Daniel