I'm using CodeIgniter 3 and I want to expand default Language Helper.
CodeIgniter by default allows with function lang(language_key)
get a value from language file, but my language file is different.
Default language file:
$lang = [
'MONTH_JANUARY' => 'January',
'MONTH_FEBRUARY' => 'February',
];
My file:
$lang = [
'MONTH' => [
'JANUARY' => 'January',
'FEBRUARY' => 'February',
],
];
I want to create a helper function with explode.
For example, using lang('MONTH.JANUARY')
it will look for $lang['MONTH']['JANUARY'] and return 'January'.
What would be the best way to do it?