-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature: Translated Routes / URLs #12
Comments
@natemoo-re, a co-creator and core maintainer of Astro said:
In my response, I provided feedback that included translated routes, like Unfortunately, I have not found any workarounds to make translated routes work. To be more specific @dschoeni
Due to that limitation in this example, I had to call While it is possible to:
I believe the best solution is for i18n to be a first-class concern of the Astro framework. If you can think of any better workarounds @dschoeni, please let me know! |
First of all, thanks for your extensive reply. We have decided for the time being to not use translated routes, but to keep using The setup works reasonably well for the time being. Maybe when we truly need translated routes, astro will have i18n built in and we can swap everything out for a core-solution. |
First of all, thanks a lot for this great library! It helped me replace my piece of custom code that served a similar purpose (and generated the corresponding
/[lang]/*
routes during static generation, without an additional build step or duplicated templates).However, one feature that would be particularly great to have: translated routes. I know its mentioned in the docs that this currently isn't possible (also due to compatibility with
@astro/sitemap
).Basically, I'm talking about a feature like this: https://github.com/yassinedoghri/astro-i18next#-translate-routes
What would be necessary to make this happen, and where are the challenges? I took a look into the code and got the impression that it might be possible to do, but I guess you already tried and found the hidden challenges ;)
Couldn't we adapt the generated paths in the
astro_tmp_pages_
with a supplied config map?The text was updated successfully, but these errors were encountered: