All documentation for Redwood now lives in the /docs
directory in the main repo: https://github.com/redwoodjs/redwood That directory now contains this Docusaurus site with all documentation from redwoodjs.com.
Deployment URL: https://learn.redwoodjs.com/
We currently support English, French, Spanish, Portuguese and Italian, but wish to include more languages!
Hey polyglots, want to help translate or proofread? Check out the Translation Guide to find out how to get started
We are using a late stage Alpha release of Docusuraus 2 that includes experimental integration with l10n management service Crowdin. i18n is a bleeding edge feature of Docusaurus and official documentation has not been released yet. However, there is unofficial documentation here, and we also have this PR and this explanatory comment to reference.
We are also learning from the source code for Jest website migration on docusaurus-2
branch, which is using this same undocumented setup for their localized docs. See their test site here: https://jest-v2.netlify.app/
yarn install
yarn start # defaults to serving English locale
- NOTE Only one locale can be served in development at a time, so start yarn with the locale with it's language code if you want to test
yarn start --locale fr
P.S., the language switcher doesn't really work in development. No worries, things work better once the site is built and served. Try this and the locale switcher suddenly works:
yarn build
yarn serve
Source content markdown files are found in docs/
, which map to locales in i18n/%lang_code%/<plugin>/current/
.
├── docs
│ └── tutorial
├── i18n
│ └── fr
│ └── docusaurus-plugin-content-docs
│ └── current
│ └── tutorial
Target language codes follow ISO 639-1 codes
Localized content without a "counterpart" for the source content fallbacks to the source locale (English).
All translation is done via our Crowdin repo to make sure our translations do not go stale.
Fully approved translations made from the above repo are auto-PR'ed into this Github repo (every 10 minutes).
If a static asset is referenced in the source markdown with a relative path (ex: []!(../img/logo.svg)
), the path will break in the target locale document which is in a differently nested directory.
Use absolute paths for local static assets that do not change across locales.
If it is an image that you feel absolutely inclined to localize, you can use relative paths and include files with the exact same name (with different image content) at the same relative path in all target dirs. ^ This is cumbersome - let's try to be as lazy as possible and not localize image assets unless totally necessary.
For links to other docs inside the tutorials
directory, USE RELATIVE LINKS!
In [previous section](./our-first-page) we....
This ensures accurate linking no matter what locale a user is viewing.
# acessing ./our-first-page from within tutorial/* works in any locale
/docs/tutorial/our-first-page/
/fr/docs/tutorial/our-first-page/
Crowdin is our localization (l10n) manager. We use a Github integration to sync our Crowdin repo with this repo.
Questions or ideas? Hit up @clairefro or drop a post in the Redwood forums under "Docs & Content Translations"