I currently have file system that looks like this:
example.com/project/EN/1/2/2.html example.com/project/DE/1/2/2.html
All websites have the same base html file, and I would like to add a button where users can switch between different languages but stay on the same page (/1/2/2.html).
The button would therefore need to be able to get the current location and create the other links (to /DE/, /FR/, etc) on the spot.
I tried to get the current url and then produce the other urls respectively, but failed because I couldn’t figure out how to fetch only parts of the url.
Aucun commentaire:
Enregistrer un commentaire