Welcome Guest, Not a member yet? Register   Sign In
Using Language file for storing arrays
#1

Hi all.

im using my language files to store and retrive arrays to fill my select boxes in a multilangual site.

Code:
$lang['profil_user_language_select']   = 'Afrikaans,Akan,Aklanon,Albanian,Amharic,Arabic,Assamese,Azerbaijani,Belarusian,Bengali,Bhojpuri,Bihari,Bosnian,Bulgarian,Burmese,Cebuano,Chavacano,

in this example it shows just a few language entries but does get quite large

im gonna change it to use json file structure  like
Code:
$lang['profil_user_language_select']   = '{"fr" : "French","en" : "English"}',

is this a good way to do this or should I use external json file and load it through the controller before passing it to the view ?

thanks
Reply




Theme © iAndrew 2016 - Forum software by © MyBB