Language does not switch while cache is enabled

If you have any kind of caching enabled on a site with WordPress, IMHO, it’s probably best to use cookies instead of session variables, because with caching enabled, the user’s request for a page may not even hit the server at all — so the session var isn’t even being read.

What I typically do is use cookies — both setting AND reading them on the front end via ajax. You could dynamically load the new language content that way.

––-––––-

Adding on to answer your second question. If you look at a plugin like WPML or something similar, they are actually creating duplicate content in many cases. So a site might be mydomain.com/en for English and mydomain.com/es for Spanish. Each endpoint is cached separately. Some cookies are probably set as well, but when you switch languages with WMPL, you are actually redirected to a different page, not the same page with different language content… if that makes sense?