-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Index routes are not taken into account #39
Comments
I think there may be an issue with how it's implemented, where I don't take |
Thanks Florian, For example: // the page is `about.astro`
"/about": {
fr: "/a-propos", // this does not localize the url
en: "/about"
}, If my default locale is |
Not sure I understand that one. What are you calling and what do you get/expect? |
Ok, sorry, let me rephrase.
The page lives in Interestingly, when I call Does that mean that the string for the default locale will never override the name of Astro file (and thus the path)? I hope it's clearer... :) |
I'm not sure but I think it doesn't work like that. If your default locale is //astro.config.mjs
i18n({
defaultLocale: "fr",
locales: ["fr", "en"],
pages: {
"/a-propos": {
fr: "/a-propos",
},
},
}), |
Yes, that's what I figured.
Do you still consider the fact that the index page within a folder not getting properly localized is a bug? If not, we can close this if you'd like. |
Yeah definitely a bug, worth keeping open for other who may stumble across it |
Hi there!
I'm having a bit of an issue setting up localized URLs. I read the relevant config page, but I can't get to work.
Config
Folder structure
src/routes/
------------index.astro
------------about.astro
------------portfolio/
----------------------[slug].astro
----------------------index.astro
------------blog/
----------------------[slug].astro
----------------------index.astro
navigation data
I iterate over an array to create the nav links
Expected output: hitting
/portfolio
returns a localized urlwww.example.com/nos-realisations
orwww.example.com/our-work
What I get: no localization - hitting
/portfolio
returnswww.example.com/portfolio
, no matter the locale.Thank you for your time!
The text was updated successfully, but these errors were encountered: