-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update i18n recipe and guide for better integration #11768
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Draft for now because I need to finish the last 2 recipes. But everything else is finished, reviews are welcome! |
Hi @casungo ! This is still marked as a draft, and I'm not sure whether you considered this finished, but it's been hanging around for a while and I do have some initial feedback here: The i18n guide pageThe original issue had to do with our recipe not using the i18n API at all, which people found (understandably!) confusing, and which meant that our recipe had to build some strategies for things that actually already exist if you just use the API. I don't think the i18n guide page needed to change at all to address the issue, and I don't think we should consider making any changes to it at this time. There is already a lot going on here, and even though every page can always be improved, I think that's a separate issue and will only take more time and effort when we really need to focus on the recipe! 😄 The i18n RecipeI think there are some very specific changes you've made here that incorporate the newer i18n routing features well! Specifically, I think the steps in "Translate UI strings" and "Let users switch between languages" are now better because we can determine the current locale. I don't think very much before those steps in this guide should change though. What makes a recipe easy to follow is that it is very simple steps, with explicit instructions (few or no choices to make) and very little extra information like explanation. I think a lot of the earlier content you've added makes the steps less easy to follow and tries to "teach" about what the API is, and had some "if you're doing this" which a recipe should not have. A recipe should be opinionated and make a choice so that the readers have something to follow (and so WE know what the reader has already done so we can confidently tell them what to do next, and not worry that they chose a different option). So, here's what I think helpful changes from the original guide would be:
So if you are still available at some point (no rush of course! everything is when ever you can!), I think those are the changes that will really help the i18n recipe! |
Description
This PR addresses issue #9256 by updating the internationalization (i18n) recipe and guide to improve clarity, integrate modern Astro API features, and ensure they complement each other effectively.
Related issues & labels
improve or update documentation