facebook / facebook/docusaurus
[i18n] Making everything translatable (website title, description...)
- Ngôn ngữ chính
- TypeScript
- Star
- 66.2k
- Fork
- 10k
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 52
Mô tả
## 🚀 Feature
First of all, the i18n feature of Docusaurus is terrific, thanks a lot!
It seems that the website's title can't be translated. It's not a big problem if the website title is just a simple name or doesn't have much meaning. However, It's really not ideal especially when the website uses languages that use different alphabet: imagine the main language of the website is Chinese (or Hebrew, Thai, Russian, etc) and the website title is also written in this language, then all final html pages' title will contain this website title, even for pages written in secondary/other languages (English for example), which is a bit bad for viewers and SEO since the website title in the html title is almost unreadable.
Thus, I think it's a good idea to include the possibility to translate the website title in the i18n feature, to improve readability and SEO in the cases illustrated above.
### Have you read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/master/CONTRIBUTING.md#reporting-new-issues)?
Yes.
## Motivation
See above.
## Pitch
It would be great if the website title can be translated just like how the navbar/footer/react code is translated: add translations in some json file in `i18n` directory. Or even better: provide the website title translation in `i18n` in `docusaurus.config.js` directly (maybe in `localConfigs` for example, with a optional field for website title translation).
PS. Still need to mention this again: thanks for the awesome i18n feature!
## TODOs
- [ ] site metadata in docusaurus.config.js
- Website title
- Announcement bar
- Logo alt
- Tagilne
- Copyright
- [x] Admonition title
- Blocked by 3p deps
- [X] Strings in plugin options
- Blog sidebar title
- [ ] DocSearch model
- Blocked by 3p deps
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.