Welcome Guest, Not a member yet? Register   Sign In
setLocale() doesn't change the language set by browser
#4

Thank you but it's still not working.....
Checking with $language->getLocale() I see it's changing but in the lang() function it doesn't nor for validation...

PHP Code:
public function setLanguage($real_language)
 {
    $language = \Config\Services::language();
    $language->setLocale($real_language); 

    /*just for debuging*/
    $session = \Config\Services::session();
    $session->set('language',$real_language);
    $session->set('locale',$language->getLocale());

return 
redirect()->back();

Reply


Messages In This Thread
RE: setLocale() doesn't change the language set by browser - by blackrabbit - 04-26-2020, 12:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB