CodeIgniter Forums
Loading New Language after Profile edit - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Loading New Language after Profile edit (/thread-13935.html)



Loading New Language after Profile edit - El Forum - 12-12-2008

[eluser]Unknown[/eluser]
Hi there,
I am giving an option to my registerd users to have the language of their choice .
They can edit the language later on.I have 5 differnet languages and 4 kind of registerd users for my site.
My problem is that i can change the language and store it to a session and database both .But on redirecting the page to "Profileinfo" , I can not show the information with the new language just changed by the user.
To look the new language contents he/she will have to refresh the page again manually or click to some ohter link .

Any help will be appreciated !
Thanks,
vdsindr


Loading New Language after Profile edit - El Forum - 12-12-2008

[eluser]gon[/eluser]
You could change the language using AJAX, and when the server returns the ok signal, do a redirect. Having done the AJAX call, the session will have the new language stored, so when redirecting the correct language will be used.