Welcome Guest, Not a member yet? Register   Sign In
Multi language, sub domains and sessions
#1

[eluser]Unknown[/eluser]
hello to all !

Im starting my second project with code igniter and this one has to be in 4 languages separated by subdomains.

They all "point" to the same http_dir.

I have done a "pre_controller" hook that converts the subdomain to a language and define a LNG var to play with the language files. Thats ok.

But, when i connect, then change language, i loose my session.

With a normal PHP session, whe can set the cookie to something like *.domaine.com and i can stay connected on all sub domains.

Is there a way to to this with codeigniter ?

I whas thinking about going to extremes by passing the cookie session id in the url, but i dont like that much.

Thx for your help,
Sky
#2

[eluser]summery[/eluser]
I think it's possible with CodeIgniter.

Try this: using the Cookie Helper, be sure to set the
Code:
'domain' => '.some-domain.com'
parameter, and be sure to include the "." in front of some-domain.com. That should set a cookie that's accessible to all sub-domains.

Good luck!
~S




Theme © iAndrew 2016 - Forum software by © MyBB