![]() |
Set default language from session internationalization i18n - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Set default language from session internationalization i18n (/showthread.php?tid=48135) |
Set default language from session internationalization i18n - El Forum - 01-05-2012 [eluser]kolxoznik1[/eluser] I am using CodeIgniter 2.1 internationalization i18n and I do not want to do the default language fr website but want to give people chance to choose their. So for now I am using MyLang.php Code: function default_lang() But I want to set default language from session! is it possible ? I tried this code but it get error Code: if ($this->session->userdata('language') != '') but it get error Quote:A PHP Error was encountered Set default language from session internationalization i18n - El Forum - 02-13-2012 [eluser]Reevak[/eluser] I have the same issue! I want to use sessions to determine the language if a session exists! Was anyone able to solve this?? Set default language from session internationalization i18n - El Forum - 02-14-2012 [eluser]Unknown[/eluser] Because the file is auto required from /components, whereas it isn't in /controllers Set default language from session internationalization i18n - El Forum - 02-26-2012 [eluser]Noobigniter[/eluser] any solution ? Set default language from session internationalization i18n - El Forum - 02-27-2012 [eluser]Reevak[/eluser] I found a good answer here ![]() http://stackoverflow.com/questions/9282949/codeigniter-2-1-internationalization-i18n-override-default-language-if-user-da |