Upload translations or keys

Upload existing translations or translation keys from your local project files. The uploaded translations and translations keys you can find in the translation editor.

upload translations

💿 Installation

Install SimpleLocalize CLI

curl -s https://get.simplelocalize.io/install | bash

Problems with CLI? Checkout troubleshooting section.

👨‍💻 Usage

simplelocalize upload \
 --apiKey PROJECT_API_KEY \ 
 --uploadPath ./my-messages.json \ 
 --uploadFormat single-language-json
 --languageKey en

📦 Upload formats

uploadFormat Description
multi-language-json one JSON file with multiple languages
single-language-json JSON file with one language (use languageKey param to specify language)
simplelocalize-json JSON format prepared for integration purposes
excel Microsoft Excel spreadsheet in *.xlsx format
csv , or ; separated translation keys
yaml yaml file format
android XML Resource Strings file
localizable-strings Localizable.strings file format
java-properties Java properties file

Example

CLI upload

SimpleLocalize CLI can also upload JSON generated by FormatJS CLI. Learn more about FormatJS CLI + SimpleLocalize CLI integration

🗂 Translations are in multiple files

If your project structure uses one translation file per language translations then you can use special syntax in uploadPath option. Use {lang} variable to load all translations from JSON files.

Example

Let's assume you have project structure like below project structure

In that case uploadPath param should look like following messages_{lang}.properties. CLI will automatically extract language key from file name and upload it accordingly.

Example command usage

simplelocalize upload \
 --apiKey PROJECT_API_KEY \ 
 --uploadPath ./messages_{lang}.propertis \ 
 --uploadFormat java-properties

Learn how to download translations. Optionally, you can also check how to export translations using API.