Is there a built-in way to have links in the page link to the current locale? For example, if I'm in /es/about then I want link to Home from that page to go to /es and not to /.
I imagine I could create a custom Link component to take care of this. Just don't want to reinvent the wheel. Thanks!
They aren’t documented yet, but there are several helpers included. For example, you can use getLocaleUrl("/", getLocale(Astro.url)) to go to /es. Thanks for asking!
Is there a built-in way to have links in the page link to the current locale? For example, if I'm in
/es/about
then I want link to Home from that page to go to/es
and not to/
.I imagine I could create a custom
Link
component to take care of this. Just don't want to reinvent the wheel. Thanks!