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.cn/
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
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).
Here's the lifecycle
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"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。