Codeigniter 3, issue in changing default language dynamically
<p>I have defined the default language in application/config.php file as<code>$config['language']   = 'english' ;</code></p>

<p>But in some cases I want to switch to other language, I tried using</p>

<pre><code>$this-&gt;config-&gt;set_item('language', 'japanese');
</code></pre>

<p>and in my system/language folder I have both english and japanese folders and relevent files inside them, but when switch in controller using</p>

<pre><code>$this-&gt;config-&gt;set_item('language', 'japanese');
</code></pre>

<p>didn't work.
So how can I switch between these languages</p>