Skip to content
This integration is unmaintained due to lack of time. It should mostly work but do not expect fixes or new features.

switchLocalePath

Allows you to get the equivalent path of the current route in any locale.

1
---
2
import { switchLocalePath } from "i18n:astro"
3
4
const enPath = switchLocalePath("en") // /about
5
const frPath = switchLocalePath("fr") // /fr/a-propos
6
---