CSV - translations

Last updated: September 09, 2024Author: Jakub Pomykała
csv-translations
File format value
csv-translations

CSV Translations is the plain text file format which can be used to upload translations from your project. The csv file must start from a header, where the first column is always a key column, next are language keys columns. Every value should be separated with a comma (,), other separators are not supported. Optionally, your values can be wrapped with single (') or double quotes (").

Description column

'CSV Translations' file format offers additional description column for providing a description for translation keys. This column is optional, and descriptions uploaded via CLI are set as "Code Descriptions" by default. If you want to update translator descriptions, you have to add --uploadOptions UPDATE_DESCRIPTIONS to your CLI command.

Namespace column

'CSV Translations' file format offers additional namespace column for providing translation key namespaces.

Options column

'CSV Translations' file format offers additional options column for providing additional options and features for specific translation keys.

Supported options:

  • BLOCK_MODIFICATION - blocks option to edit translation and key (delete is still available)

File format example

"key","english","polish"
"welcome","Welcome!","Witajcie"
"about-us","About","O nas"
"register","Register","Rejestracja"

File format example with OPTIONS, DESCRIPTION and NAMESPACE

"key","english","polish","description","options","namespace"
"welcome","Welcome!","Witajcie","","HIDE,BLOCK_MODIFICATION","home"
"about-us","About","O nas","Description text", "",""
"register","Register","Rejestracja","Button text", "","common"

Upload with CLI

simplelocalize upload --apiKey <PROJECT_KEY> \
  --uploadFormat csv-translations \
  --uploadPath ./translations.csv

Learn more about SimpleLocalize CLI and translations upload feature.

Download with CLI

simplelocalize download --apiKey <PROJECT_KEY> \
  --downloadFormat csv-translations \
  --downloadPath ./translations.csv

Learn more about SimpleLocalize CLI and translations download feature.

Import with API

curl
    --request POST \
    --url 'https://api.simplelocalize.io/api/v2/import?uploadFormat=csv-translations' \
    --header 'x-simplelocalize-token: <API_KEY>' \
    --form file=@/path/to/your/file.csv

Learn more about importing translations with API

Export with API

curl
    --request GET \
    --url https://api.simplelocalize.io/api/v3/export?downloadFormat=csv-translations \
    --header 'x-simplelocalize-token: <API_KEY>'

Learn more about exporting translations with API

Was this helpful?