Home / PHP / How to use Internationalization in Codeigniter

How to use Internationalization in Codeigniter

How to use Internationalization in Codeigniter

In Language File Create your Label
language\english\message_lang.php
$lang[‘greet’] = ‘Hi’;
language\spanish\message_lang.php
$lang[‘greet’] = ‘Holla’;

In Controller Action

$data[‘lang_greet’] = $this->lang->line(‘greet’);

In View

About Mohammad Fareed

Software Engineer @ Tekzenit.

Check Also

TechO2 Hyderabad Web Developer Interview Questions

After done with the technical round, they conduct a system test over skype. here is …

Leave a Reply

Your email address will not be published. Required fields are marked *