Magento – M2 How to use URL parameter passing to select store view

magento2multistorestore-switcherstore-viewstores

We are setting multi language with different store view. In the launching page there are links to redirect to different store views.

However the __store=storeview parameter seems cannot write to cookie so after jumping several pages will switch to default store view.

Is there any way to resolve this issue?

Best Answer

You missing one underscore in the parameter name. It should be ___store={storeview_code}

Also, all state modifications should happen using POST request. Otherwise, the page might be cached by varnish or built-in cache.