A home for Electron's translated documentation.
🇨🇳 🇹🇼 🇧🇷 🇪🇸 🇰🇷 🇯🇵 🇷🇺 🇫🇷 🇹🇭 🇳🇱 🇹🇷 🇮🇩 🇺🇦 🇨🇿 🇮🇹
Do you speak multiple languages? We need your help!
Visit crowdin.com/project/electron and log in with your GitHub account to help translate.
Electron's documentation and website are authored in English.
The source content in this repo is collected from a few places:
- Markdown files from the electron repo.
- YAML files from the electron.atom.io repo
- Electron's structured API docs.
Here's the directory structure:
content
└── en
├── api
├── docs
└── website
The Crowdin project is configured to automatically pull the latest English content out of this repo and push the translated content back into this repo.
Translations are added under a directory named after the locale. The contents of these files differ by language, but the directory structure and filenames for each locale is always identical.
content
├── en
│ ├── api
│ ├── docs
│ └── website
├── es
│ ├── api
│ ├── docs
│ └── website
├── pt-BR
│ ├── api
│ ├── docs
│ └── website
└── zh-TW
├── api
├── docs
└── website
To get a sense of how content is transformed, see crowdin.yml
GitHub's documentation team reviewed numerous localization platforms (XTM, Smartling, Memsource, LingoHub, Qordoba, Transifex) before choosing Crowdin. We found Crowdin to be the best fit for the needs of the Electron project, as it satisfies most of our unique requirements:
- GitHub Flavored Markdown. Some other localization platforms do not support markdown, on the basis that it is "unstructured" (though Githubbers are working on that. Other platforms have markdown support, but few have full support for GFM.
- Aribtrary YAML data. Many localization platforms support YAML, but some have specific requirements about its structure, such as a locale key like
en
at the root node of the file. - YAML frontmatter. Tools like Jekyll (upon which the Electron website is built) use a block of key-value metadata atop markdown files like
date
,keywords
,author
,permalink
, etc. This content needs to be translated while preserving the original YAML structure.
In addition to satifying our project's unique requirements, Crowdin has some compelling features:
- GitHub Integration. Crowdin is the only provider we evaluated that can integrate with GitHub and automatically sync content in and out of repositories.
- Machine Translations. Crowdin supports machine translation using APIs from Microsoft and Google. This may allow us to save human time and energy by automating the initial translation of doc sets.
- Crowdsourcing. Electron has a huge community of open-source contributors. Whether or not we end up paying professionals to help translate Electron's docs, we will always want the localization process to be as transparent and inclusive as possible. Other localization platforms are geared toward professional translators, whereas Crowdin can be used by anyone, and has some unique collaborative features like voting.
- Login with GitHub Translators can log in with their GitHub accounts. This makes the onboarding process easier for participants, and gives us an easier way to know who to thank for the contributions.
If you are here to help translate, visit crowdin.com/project/electron and log in with your GitHub account to get started.
If you are here to use this translated content for some purpose, read on!
This repo is also a node module for working with Electron's translated content.
It is not currently published to npm, so install it directly from GitHub:
npm install electron/electron-i18n
Then require it:
const i18n = require('electron-i18n')
Exports all of Electron's structured API docs, in array format. This data is identical to the electron-api.json release asset.
Exports the same data as array
, but in a deep tree format. This can be
useful if you want to traverse the docs like
apis.BrowserWindow.instanceMethods.blur.etc.etc
Exports an array of locale names that are currently being translated.
Returns an structured object for the given API, with translations applied from the given locale.
api
String - an Electron API likeapp
orBrowserWindow
. Can be the full name likeBrowserWindow
, or the URL-friendly slug likebrowser-window
. (required)locale
String - a language locale (optional; defaults toen
)
MIT