gurbieta / i18n-crowdin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i18n-crowdin

Configuration

Add the following config in package.json

"i18n": {
  "crowdin": {
    "apiKey": "yourApiKey",
    "project": "yourProjectName",
    "marker": "i18n", // Optional
    "files": "**/*jsx", // Optional
    "destFolder": "." // Optional
  }
}

The parameters marker, files and destFolder are optional, this example show the default values

Upload to crowdin

npm run crowdin-upload

Download from crowdin

npm run crowdin-download

This generates i18n-$lang-$country.js files, for example i18n-pt-BR.js, i18n-en-US.js, etc

How to use the generated files

https://github.com/gurbieta/i18n-translator has a mini-lib to read this files and adds calls to i18n.tr and i18n.trn

About


Languages

Language:JavaScript 100.0%