i have made multi-language site thanks to polylang now i dont want to use polylang's switcher as it causes layout issues so i found a better solution is by putting a link on top. for example if user clicks:
<a href="mysite.com/fr" ...> whole website gets translated with no issues but it doesn't remember if the user went to another page for example categories page instead the language go back to default which is english unless adding 'fr' to the link manually in the browser.
my thoughts about this is to edit the base URL if the user clicks on the link but have no idea on how to allow regular user to do it or there might be a better different way
any help would be much appreciable. Thanks