forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[website] Enable Translation & Localization (apache#2251)
* [website] Enable Translation & Localization *Motivation* Docusaurus allows for easy translation functionality using [Crowdin](https://crowdin.com/). Documentation files written in English are uploaded to Crowdin for translation by users within a community. *Changes* - Enable the integration with Crowdin. - Adjust hyperlinks to include `language`. Crowdin project: https://crowdin.com/project/apache-pulsar * Add a statement about translations
- Loading branch information
Showing
11 changed files
with
306 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,3 +71,8 @@ docker.debug-info | |
# Yarn | ||
|
||
**/yarn.lock | ||
|
||
# docusaurus | ||
|
||
**/website/i18n/* | ||
**/website/translated_docs* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
project_identifier_env: CROWDIN_DOCUSAURUS_PROJECT_ID | ||
api_key_env: CROWDIN_DOCUSAURUS_API_KEY | ||
base_path: "./" | ||
preserve_hierarchy: true | ||
|
||
files: | ||
- | ||
source: '/docs/*.md' | ||
translation: '/website/translated_docs/%locale%/%original_file_name%' | ||
languages_mapping: &anchor | ||
locale: | ||
'af': 'af' | ||
'ar': 'ar' | ||
'bs-BA': 'bs-BA' | ||
'ca': 'ca' | ||
'cs': 'cs' | ||
'da': 'da' | ||
'de': 'de' | ||
'el': 'el' | ||
'es-ES': 'es-ES' | ||
'fa': 'fa-IR' | ||
'fi': 'fi' | ||
'fr': 'fr' | ||
'he': 'he' | ||
'hu': 'hu' | ||
'id': 'id-ID' | ||
'it': 'it' | ||
'ja': 'ja' | ||
'ko': 'ko' | ||
'mr': 'mr-IN' | ||
'nl': 'nl' | ||
'no': 'no-NO' | ||
'pl': 'pl' | ||
'pt-BR': 'pt-BR' | ||
'pt-PT': 'pt-PT' | ||
'ro': 'ro' | ||
'ru': 'ru' | ||
'sk': 'sk-SK' | ||
'sr': 'sr' | ||
'sv-SE': 'sv-SE' | ||
'tr': 'tr' | ||
'uk': 'uk' | ||
'vi': 'vi' | ||
'zh-CN': 'zh-CN' | ||
'zh-TW': 'zh-TW' | ||
- | ||
source: '/website/i18n/en.json' | ||
translation: '/website/i18n/%locale%.json' | ||
languages_mapping: *anchor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
/** | ||
* Copyright (c) 2017-present, Facebook, Inc. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
const languages = [ | ||
{ | ||
enabled: true, | ||
name: 'English', | ||
tag: 'en', | ||
}, | ||
{ | ||
enabled: true, | ||
name: '日本語', | ||
tag: 'ja', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'العربية', | ||
tag: 'ar', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Bosanski', | ||
tag: 'bs-BA', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Català', | ||
tag: 'ca', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Čeština', | ||
tag: 'cs', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Dansk', | ||
tag: 'da', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Deutsch', | ||
tag: 'de', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Ελληνικά', | ||
tag: 'el', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Español', | ||
tag: 'es-ES', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'فارسی', | ||
tag: 'fa-IR', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Suomi', | ||
tag: 'fi', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Français', | ||
tag: 'fr', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'עִברִית', | ||
tag: 'he', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Magyar', | ||
tag: 'hu', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Bahasa Indonesia', | ||
tag: 'id-ID', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Italiano', | ||
tag: 'it', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Afrikaans', | ||
tag: 'af', | ||
}, | ||
{ | ||
enabled: false, | ||
name: '한국어', | ||
tag: 'ko', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'मराठी', | ||
tag: 'mr-IN', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Nederlands', | ||
tag: 'nl', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Norsk', | ||
tag: 'no-NO', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Polskie', | ||
tag: 'pl', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Português', | ||
tag: 'pt-PT', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Português (Brasil)', | ||
tag: 'pt-BR', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Română', | ||
tag: 'ro', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Русский', | ||
tag: 'ru', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Slovenský', | ||
tag: 'sk-SK', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Српски језик (Ћирилица)', | ||
tag: 'sr', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Svenska', | ||
tag: 'sv-SE', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Türkçe', | ||
tag: 'tr', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Українська', | ||
tag: 'uk', | ||
}, | ||
{ | ||
enabled: false, | ||
name: 'Tiếng Việt', | ||
tag: 'vi', | ||
}, | ||
{ | ||
enabled: true, | ||
name: '中文', | ||
tag: 'zh-CN', | ||
}, | ||
{enabled: false, name: '繁體中文', tag: 'zh-TW'}, | ||
]; | ||
module.exports = languages; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.