Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Using Language file for storing arrays

$
0
0
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

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>