Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

feat: translation set up #153

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
17 changes: 17 additions & 0 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
project_id: '585007'
api_token: 'API_TRANSLATIONS'
files:
# JSON translation files
- source: /i18n/en/**/*
translation: /i18n/%two_letters_code%/**/%original_file_name%
languages_mapping:
two_letters_code:
en: en
es-ES: es_ES
# Docs Markdown files
- source: /docs/**/*
translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name%
languages_mapping:
two_letters_code:
en: en
es-ES: es_ES
14 changes: 13 additions & 1 deletion docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@ const config = {
// to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'es'],
localeConfigs: {
en: {
label: 'English',
},
es: {
label: 'Español',
},
},
},

plugins: [
Expand Down Expand Up @@ -112,6 +120,10 @@ const config = {
type: 'custom-user-navbar-item',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
prism: {
Expand Down
Loading