• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array as language_key

#1
Hello.

Is it possible to use language_key as an array?

For example, my language file looks like this:

PHP Code:
$lang array_merge($lang, [
 
   'DASHBOARD' => 'Dashboard',

 
   'DATETIME' => [
 
       'MONTH' => [
 
           'JANUARY' => 'January',
 
       ],
 
   ],
]); 

Can I fetch $lang['DATETIME']['MONTH']['JANUARY'] using Language Helper's function lang()? Or CodeIgniter doesn't support language_key as an array and I've to make my own function?

Thanks,
Vigo
Reply

#2
It does not support it like that but you may be able to extend the library and helper.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.