-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
proposalThis issue is a proposal, usually non-trivial changeThis issue is a proposal, usually non-trivial change
Description
💥 Proposal
An umbrella issue to track the translations work for v2 and guide the design and implementation on the feature in v2. Give suggestions and feedback on this issue.
Some initial thoughts:
- Translations should be a core feature built into Docusaurus core, not implemented specifically by any plugins
- We expose a current locale value in the context. Elements which need it can read from it
- For performance reasons, each translated website should be its own website (can be done via adding a
/<locale>/to thebaseUrl). This is basically sharding the website bundle so that the main bundle doesn't contain routes for each locale. If performance isn't a concern, then probably there's no need to do this
Follow this issue for updates.
Some tools to consider using:
- https://github.com/globalizejs/globalize
- https://facebook.github.io/fbt/
- https://react.i18next.com/
- https://github.com/i18next/react-i18next/
Issues with v1 translations
- Build times are slow, especially when combined with versioning
- https://stackoverflow.com/questions/59125516/versioned-docusaurus-site-returns-404-for-the-other-languages
- Feature request: Add ability to change default language #586
- "Edit doc" should more seamlessly integrate with translations #648
- Non-English Tutorial Section Images Render Markup #2206
- Translated sidebar no longer translated once versioned #2266
- Is there a way to restrict sending text for translation to Crowdin? (Docusaurus) #2278
- Pages with redirects instead of translations when docsUrl === '' and path to file includes 'en' #2306
- <html> element does not have a [lang] attribute #2471
Have you read the Contributing Guidelines on issues?
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
proposalThis issue is a proposal, usually non-trivial changeThis issue is a proposal, usually non-trivial change