Welcome Guest, Not a member yet? Register   Sign In
User switching locale
#1

I have content negotiation on for the locale. But is it possible to have a user switch locale without going the route way?
Reply
#2

You may use "$this->request->setLocale()" and "$this->request->getLocale()" methods to set and get locale from request and do not use URL segment - https://codeigniter.com/user_guide/outgo...ent-locale
Reply
#3

(11-12-2020, 02:12 AM)T.O.M. Wrote: You may use "$this->request->setLocale()" and "$this->request->getLocale()" methods to set and get locale from request and do not use URL segment - https://codeigniter.com/user_guide/outgo...ent-locale
Ah thanks!

I didn't see setLocale() in the guide which I already thought was weird.
Reply
#4

Yes, I faced the same problem until I looked to the source code Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB