Creating LanguageSelector by using the localizePath function #123
-
Hello there! <div>
<a href="/">
English
</a>
</div>
<div>
<a href="/sp">
Spanish
</a>
</div>
<div>
<a href="/fr">
French
</a>
</div> And of course, when the user is on the other pages of the site he is redirected to the home page but with the selected language. So, I have a question: is there any way for the user to not be redirected to the home page when selecting a language, but to change only the current page url? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hey @Marionetko, you can use the Also, Hope it helps! |
Beta Was this translation helpful? Give feedback.
No problem, you don't have to use the LanguageSelector, you can create your own by using the
localizePath
function to render the right route.Here's a basic dynamic example to render language selection using anchor tags: