Closed
Description
Migrated from facebook/react/issues/8063
Coordinate with docs translators via @ericnakagawa
This issue involves multiple steps:
- Integrate with Crowdin to download localized content
- Generate localized URLs using said content
- Automatically sync English content changes from GitHub to Crowdin (see this comment and this repo)
- Maintain backwards compatibility for all current (non-localized, English) links
- Add localization toggle to header
- Update the "Edit this page" link to point to GitHub for English pages and Crowdin for other languages.
Integrate with Crowdin
This could be done via a custom Gatsby plug-in. We've already written a couple. (It would be nice to work with @KyleAMathews to share this plug-in back with Gatsby so that other users could benefit from it as well.)
If we run into any performance problems, @ericnakagawa has volunteered to work with Netlify and Crowdin to simplify or speed up this syncing process. Ideally this sync process will be fast enough to allow Netlify's PR previews to also be used to test localized builds of the site.
Misc thoughts and questions
- In the case of non-localized content, Crowdin serves English as fallback.
- How can site consume list of active locales? Is there a Crowdin API?
- How does this impact urls (eg
/docs/<file>
,/docs/<lang>/<file>
)?