i18n - 소개
It is easy to translate a Docusaurus website with its internationalization (i18n) support.
Goals
It is important to understand the design decisions behind the Docusaurus i18n support.
For more context, you can read the initial RFC and PR.
i18n goals
도큐사우루스 i18n 시스템의 목표는 아래와 같습니다.
- Simple: just put the translated files in the correct filesystem location
- Flexible translation workflows: use Git (monorepo, forks, or submodules), SaaS software, FTP
- Flexible deployment options: single, multiple domains, or hybrid
- Modular: allow plugin authors to provide i18n support
- Low-overhead runtime: documentation is mostly static and does not require heavy JS libraries or polyfills
- Scalable build-times: allow building and deploying localized sites independently
- Localize assets: an image of your site might contain text that should be translated
- No coupling: not forced to use any SaaS, yet integrations are possible
- Easy to use with Crowdin: a lot of Docusaurus v1 sites use Crowdin and should be able to migrate to v2
- Good SEO defaults: we set useful SEO headers like
hreflang
for you - RTL support: locales reading right-to-left (Arabic, Hebrew, etc.) are supported and easy to implement
- Default translations: classic theme labels are translated for you in many languages
i18n non-goals
아래 항목은 지원하지 않습니다.
- Automatic locale detection: opinionated, and best done on the server (your hosting provider)
- Translation SaaS software: you are responsible to understand the external tools of your choice
- Translation of slugs: technically complicated, little SEO value
Translation workflow
Overview
번역한 도큐사우루스 웹 사이트를 만드는 절차를 살펴봅니다.
- Configure: declare the default locale and alternative locales in
docusaurus.config.js
- Translate: put the translation files at the correct filesystem location
- Deploy: build and deploy your site using a single or multi-domain strategy
Translation files
여러분은 3가지 종류의 번역 파일 작업이 필요합니다.
Markdown files
여러분의 도큐사우루스 웹 사이트의 중심이 되는 콘텐츠입니다.
마크다운과 MDX 문서는 각 단락을 개별적인 문자열로 잘라주긴 하지만 전체 콘텐츠를 유지하기 위해서는 모두 번역해야 합니다.