#Localized routing

3 messages · Page 1 of 1 (latest)

stable zenith
#

Hey, looking to replace my go-to framework Next.js with Astro. Mainly to create more environmentally sustainable websites. Astro looks very solid. I’m wondering what the go to way for localising routes is in Astro. There seems to be no docs on this subject. Thanks.

#

For example, what would creating a website with a homepage for both en and fr look like? Moreover, what would the setup be for pages such as /en/products/[slug] and /fr/produits/[slug] be. Last but not least, how could one of the languages be the default, excluding it from the URL pattern, such as /products/… and /fr/produits/…

iron heron
# stable zenith For example, what would creating a website with a homepage for both en and fr lo...

You can try using this library but I don't think it supports translated routes/slugs https://github.com/yassinedoghri/astro-i18next#readme

GitHub

An astro integration of i18next + some utility components to help you translate your astro websites! - GitHub - yassinedoghri/astro-i18next: An astro integration of i18next + some utility componen...