When preparing translations for uploading in Excel format, you have two options:
- One file — one language.
- One file — multiple languages (multilingual excel).
This document covers both options. Note that currently we support Spreadsheets (.xls) and Excel Workbooks (.xlsx). The latter is the default format in Excel 2007 and later versions.
One language per Excel file
If you choose this approach, then you'll need to separate translations for different languages into multiple files. The principle is one worksheet and one language per file. It is also advised to name the files after the locale codes (
fr etc) so that Lokalise can detect the language properly.
Your Excel file should contain the following columns:
- Key name (required)
- Translation (optional)
- Description (optional)
- Comment (optional)
Here is an example of a valid Excel file:
The order of the columns may be different if you are uploading via the web interface because it would be possible to designate arbitrary columns as key name, translation, and so on. However, if you are importing via the API/CLI tool, the columns must follow the order shown above.
Proceed to the Upload page and choose one or more files from your PC. You will be presented with the following dialog:
Using these dropdowns you may specify what data each column contains or ignore the given column:
Once you are ready, press Apply and then click Import the files to start the uploading process.
Check the Activity page to view the status of your upload:
To download translations in Excel format, proceed to the Download page and choose Excel from the Format dropdown. Translations for different language will be placed into separate files:
Please remember that in order to export descriptions and comments, you need to enable the corresponding options:
Multilingual Excel format allows you to upload a single file containing translations for multiple languages.
Your multilingual Excel file should follow these requirements:
- The first row must be a header containing the following fields:
locale_codeN(at least one locale code has to be provided),
- Subsequent rows contain the actual key data. One row — one key.
So, here is an example of a valid multilingual Excel file:
- It contains two keys:
- There are translations for three languages: English, German, and French.
- Each key has a description and a comment (remember that these fields are optional).
After preparing a multilingual Excel file, you may proceed to the Upload page and start the importing process as usual. After the file is selected, you will be presented with the following dialog:
Using these dropdowns you may specify what data a specific column contains or ignore the given column altogether. It is also possible to adjust languages by clicking on the locales dropdowns:
After you are done, click Apply. You should see a single file with all the locales it contains:
After the upload is finished, you may check detailed information by accessing the Activity page:
To download translations in multilingual Excel format, proceed to the Download page and choose Multilingual Excel from the Format dropdown. All translation keys assigned to the same Excel file will be exported in a single file with the proper name. All other keys that are not assigned to any file, will be placed inside the no_filename.xlsx file.
Please note that in order to export descriptions and comments, you need to enable the corresponding options:
Note on skipped translations
Suppose you have a translation key
welcome with English, French, and Latvian values. English and Latvian values are verified whereas French translation is marked as unverified:
Then you export this key in multilingual Excel format and choose to omit all unverified translations. The resulting file will have the following contents:
Note the grey background for the French translation (the color code is
#f3f3f3). This special formatting means that the French translation was omitted but still it has some value in the project, in other words it is not empty. If you import this multi-lingual Excel file back to your project, the French translation won't be overwritten with an empty value.
If, however, you remove the grey background and try to import the following file:
Then French translation value will be treated as empty. It means that the corresponding value in your project will be set to
Therefore, be careful not to remove the grey background if you don't wish to nullify translation values upon importing the file.