XLSX
XLSX (Microsoft Excel Open XML Spreadsheet) is a format for storing table-like data. In Tolgee, you can import and export your localization data in XLSX format. All sheets in an XLSX file are imported separately and treated individually. Each sheet must have its own header, which defines the key and language columns.
Additionally, older XLS files are supported for importing, but exporting will always use the newer XLSX format.
When exporting in this format, you can choose from various placeholder & message formats listed below.
Read more about message & placeholder formats here.
Example of XLSX:
key | en | cs |
---|---|---|
save.button | Save | Uložit |
form.label | Form | Formulář |
When importing XLSX, the first row in each sheet is used as a header, and the following rows are used as translations. The first column is used as a key, and the subsequent columns are used as translations for the specified languages.
The message format and placeholder conversion
When importing data to Tolgee from the XLSX files, you can either enable or disable the conversion to the Tolgee Universal ICU placeholders. The conversion is enabled by default. You can also disable the conversion globally in the project settings. We recommend keeping the conversion enabled, as it brings many benefits. Read more about the benefits of Tolgee Universal ICU placeholders.
When the conversion is disabled, the original placeholders (e.g., %s
, %d
). are preserved. The message format is automatically detected when importing data in XLSX format. When exporting, you can choose from message & placeholder formats listed above.
Exporting via Tolgee CLI
After installing Tolgee CLI, you can use the tolgee pull
command to export translations in XLSX format.
Example with CLI:
tolgee-cli --api-key "<Your Project API key>" --format XLSX pull
Exporting via REST API
To export to XLSX via REST API, you have to set the following parameters:
{
"format": "XLSX"
}
Example with CURL:
curl "https://app.tolgee.io/v2/projects/export?format=XLSX&zip=false" -H "X-API-Key: <Your Project API key>" --output exported.xlsx
Importing / Exporting in general
To read more about importing and exporting with Tolgee, continue to import section or export section.