-
Notifications
You must be signed in to change notification settings - Fork 189
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
Setup i18n for docusaurus #3041
Conversation
To add a new language later, we have to add the LOCAL_CODE in |
Sounds good for me. |
91cdd8a
to
a72a3b6
Compare
a72a3b6
to
ffc3e88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, it worked for me. Later on, we would add the translation version in to the file inside src/docs/i18n
, is that correct?
yes, if you looked at the structure there is a folder for each languages we are translating for |
ffc3e88
to
560bac7
Compare
560bac7
to
9d67c30
Compare
htmlLang: 'en-CA', | ||
}, | ||
fr: { | ||
htmlLang: 'fr-fr', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fr-CA
? 🇨🇦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about the difference between fr-CA and fr-fr. I'm translating this page, so my French is from France
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kevan-Y what do you mean ? I think it meant to be en-CA, en-FR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following this, https://www.fincher.org/Utilities/CountryLanguageList.shtml.
Issue This PR Addresses
fixes: #2922
Type of Change
Description
Setup i18n for docusaurus, I only put languages that we are going to translate based on the table of this issue #2962
Note: Only the overview page is overwritten, the rest is gonna stay in English
Steps to test the PR
Option 1: Run build
cd src/docs
pnpm build && pnpm serve
Option 2: Run dev
cd src/doc
pnpm start -- --locale <LOCAL_CODE>
e.g.pnpm start -- --locale fr
(For the french version)2022-02-24.11-36-27.mp4
Checklist