Codigniter multidimensional language array, problems?
I'm creating a website in CodeIgniter, I wanted to know if this way of
using a multidimensional array in the language file would create any
problems, like this:
$lang['profile']['name'] = 'The text to be shown';
This way I can use one file for multiple things and also I can to loop
thru buttons this way:
$lang['profile_btns']['1'] = 'Text btn 1';
$lang['profile_btns']['2'] = 'Text btn 2';
//Etc...
I read the values like this:
foreach ($this->lang->line('profile_btn') as $key => $value){
echo $value;
}
This is working fine, but I'm not sure if using this method would/could
create any issue due to the non-standard CI use (this is not written in
the CI manual).
No comments:
Post a Comment