i want to make a multilangual site, where the secondary language is a copy of the site in a different folder. For example:
- Primary language url:
example
- Secondary language url:
example/en
So there are two websites with the same content, only the language and the directory are different.
I want to create a "language switcher menu item" that dynamically changes the page url. For example:
- if i'm on the
example/about
page after clicking the "language switcher menu item", i want to go to theexample/en/about
page. - so all it have to do is that this menu item dynamically changes the current page's url (it replaces the original domain from
example/
toexample/en
), and it does not modify the rest of the url (the url structure on the two sides is of course the same)
I hope I have been able to describe it clearly.
Thanks for the help in advance!