I'm saving the user language choice into the sessions like this:
$this->session->set_userdata('language', $language);
And then I'm setting the language depending on the session data (and making a English , as a default language).
if ( !$language = $CI->session->userdata('language') )
{
$language = "english";
}
$CI->config->set_item('language', $language);
It works good, but the language that user has chosed lasts only for approx. 2 hours - then user have to pick the language again. So the question is, how can I extend the session time to expire (or make it expire only in case if user cleans up the browser data). I can not save the user choice in the database, because I need to also handle guests on my website.
I know I can extend the session time in the CI's config, but I just want it to happend only in case of the language selection, and not for example for accounts sessions.