CodeIgniter Forums
How to make Multilingual website in CodeIgniter 3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: How to make Multilingual website in CodeIgniter 3 (/showthread.php?tid=62530)



How to make Multilingual website in CodeIgniter 3 - dr.momen - 07-25-2015

How to make Multilingual website in CodeIgniter 3?


RE: How to make Multilingual website in CodeIgniter 3 - sammyci - 07-26-2015

Am new to CI but just did a multilinqual app using cookies. just create your language files and call them from controller then echo them in your views.


RE: How to make Multilingual website in CodeIgniter 3 - mwhitney - 07-27-2015

The main thing to remember is that, whether you use a user setting or URI to indicate the current language, you can set the configured language (as early as possible), then all later calls to load language files will load the file for that language.

PHP Code:
$this->config->set_item('language'$this->current_language);

// load the file /application/language/{$this->current_language}/application_lang.php
$this->lang->load('application');