Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB