File Extension(s) | .xlsx, .xlsm, .xltx, .xltm |
i18n type(s) | XLSX |
XLSX, XLSM, XLTX, and XLTM are spreadsheet file formats used by Microsoft Excel; they can also be read by and edited in other compatible programs such as LibreOffice and Google Docs.
All source strings and translations are in the same file with these formats, which differs from the usual source and language file structure in Transifex. When you upload a spreadsheet file with pre-existing translations, Transifex will add the source strings and translations to the database. Similarly, when you download the file from Transifex, translations from all languages will be in it.
Structuring your spreadsheet
📝Cell Formatting: Any rows where the source string cell is not formatted as text (e.g., date/time) will be ignored and not imported. The purpose of this is to avoid breaking any formulas that may be used by the cell.
Spreadsheets used for localization typically organize their languages and strings in columns. Each column represents one language, with the header row of the column specifying the language. And below that, you have the strings/translations for that language.
For example:
English | French |
Hello | Bonjour |
You can use the languages' names or ISO codes as values for the header/language row.
How Transifex finds the language row
Transifex is pretty forgiving about how you format your spreadsheet file. If you have rows above the languages row – for example, with instructions for your translators – Transifex will skip them.
So this file, for example, would still be compatible with Transifex:
Use formal language | Use formal language |
English | French |
Hello | Bonjour |
And if your file has more than one sheet in it, and your strings aren’t in the first sheet, Transifex will still try to find them.
In general, the Excel parser will look for your strings this way:
It goes through every sheet and row in the file in order.
It finds the row that contains the language names.
Finally, it scans that row and those below it in the sheet and loads their content in Transifex for translation.
📝 Note: If multiple sheets contain localization content, only the first sheet that meets the criteria will be parsed. The rest will be ignored.
Extra columns and duplicate phrases
Provide Context
By default, Transifex does not allow duplicate strings in Excel sheets unless you distinguish each phrase with a unique context. You can have columns between the language columns for context purposes. You can name such a column in any way you want, but a good convention is to name it Context.
Transifex won't treat it as a translatable string. The contents of the column are added as developer comments for the phrase and shown in the Editor to Translators. Each note can have up to 1,000 characters.
Below is an example where English is the source language, and the Context column is present.
English | Context | French |
Hello | Appears on the welcome page | Bonjour |
Hello | Appears on the sign-up page | Bonjour! |
World |
| Monde |
⚠️Warning: Please ensure that the Context column is right after the column where the source strings are included.
Define keys in XLSX
To set the value of a key in an XLSX source file, you need to create a new column in your source file named "key". This "key" column should be next to (before or after) the source language column or next to (before or after) the "context" column.
The "key" column will get uploaded into the key field in Transifex. The key is helpful in filtering in the visual context tool and Transifex Web Editor.
Below is an example where English is the source language, and the "key" column is present.
Version #1:
English | Key | French |
Hello | Appears on the welcome page | Bonjour |
Hello | Appears on the sign-up page | Bonjour! |
World | key1 | Monde |
Version #2:
Key | English | French |
Appears on the welcome page | Hello | Bonjour |
Appears on the sign-up page | Hello | Bonjour! |
key1 | World | Monde |
Define the character limit in an XLSX source file
You can define character limits for the translations by adding this numerical limit in a separate column in your XLSX file.
Character limits must be added to a column named "Character limit". The name of this column is case-insensitive and will consider spaces, dashes, and underscores. As an example, the following column names are acceptable:
character Limit
character-limit
chAraCtER_liMit
This column is not required, so Transifex will still parse your file if you don't include this.
Add tags to strings
You can add tags to strings directly in your XLSX file and then update your strings in Transifex via a simple upload using a dedicated column named "Tags".
The structure of your source file, in this case, will look like this:
English | Tags | French |
Localization | homepage | localisation |
The world of software | article, email | Bonjour! |
Transifex | locked | Monde |
Transifex app | notranslate |
|
For any tag changes happening in Transifex (new tags are added, existing tags are removed), you can request the latest version of the XLSX content from Transifex, and the updated tags will be exported as well.
📝Note: This column is not required, so if you don't include this in your XLSX file before uploading the file to Transifex, Transifex will still parse your content, but no tags will be updated or exported once the file is requested.
Get translation dates upon export
If you want to get the date of the latest translation applied to your strings whenever you request the XLSX file from Transifex, then all you need to do is to ensure that for every target language, there is an extra column called "modified".
So, before you upload your XLSX source file to Transifex, make sure you follow the format below:
Example Format:
After your strings are translated in Transifex, when you request the file back, these columns will contain the date of the last translation applied to each of the strings included in your file for every target language.
The following column names are acceptable:
modified
translation_date
modified_on
translated_on
Duplicate phrases
You can use the context column to differentiate between the same source phrases, such as those that should be translated differently. For example, if you have the word "Hello" twice in your file (the same key is used for both phrases), and you want to allow translators to translate it differently in each case, you should provide a different context for each one of the strings above to differentiate.
If you have duplicate English phrases and both "key" and "Context" are the same, Transifex will complain and ask you to fix the error.
📝Note: If both key and context values are present in the source file, the key and context will participate in the hash generation process. Otherwise (if the key is missing), the source string + context will participate in the hash generation process instead.
Mismatches between languages in the file and the project
In Transifex, each project has a set of target languages it gets translated to. If there are any differences between the languages in the uploaded file and the project, Transifex will try to deal with this as gracefully as possible.
Here's a look at a few possible scenarios:
If the file you upload has languages that aren't in the project, those languages will be ignored. Strings from those columns won't be added to Transifex nor appear in the Editor. To add those translations to Transifex, first, add the language to the project, then re-upload the file. Any content that isn't added to Transifex will remain in the file, unchanged, when you download the file.
If the project has languages that aren't in the file, the upload will proceed without issues, though, of course, no translations will be uploaded for those missing languages. You can still translate those languages in the Editor. When you download the file, the extra languages will be added as new columns at the end of your spreadsheet.
If you are unhappy with the order in which the languages appear or with the style of the extra columns, you can edit the file offline to make it look as you want and upload it again as a source file.
Uploading and downloading options
If you upload a file through the Update Source File function in Transifex, all strings in the file will be extracted from the spreadsheet. This means both source strings and translations will be updated inside Transifex. If you upload the file through the Upload File function, only strings from the selected language will be uploaded to Transifex. This gives you more control over which languages get updated.
When you download a file, however, all available translations from all languages will be included in the downloaded file. You can still choose to download only reviewed strings when downloading, in which case, only the reviewed translations will be used.
Working with spreadsheet files with multiple sheets
Uploading multiple spreadsheet files into Transifex can be a time-consuming task; you can save time by merging them into a single file with multiple sheets and uploading this file once rather than uploading them one by one.
Considerations when creating your Spreadsheets file with multiple sheets
Please be sure to consider the following points when formatting your file:
Source language should exist in all the sheets:
When using a structured Excel format, make sure that the column containing all the strings in the source language is present in all the sheets of your Excel file. If the source language is missing in any of the sheets, the uploading process will be interrupted, and the platform will display an error message. The error message will indicate the source language of the project and the name of the sheet in which it was not found.
Languages should appear only once per sheet
When working with a structured Excel format, it's important to ensure that each language column appears only once per sheet. You can have the same language column in multiple sheets, but it should be unique to each sheet. If a language column is listed more than once in the same sheet, an error message will appear; the error message will display the language that appears more than once in the sheet, as well as the name of the sheet in question.
Source strings should appear only once per spreadsheet file
It is important to ensure that all strings are unique. If you have multiple strings with the same text, it is recommended to differentiate them by adding additional context. If you have a duplicated string, you will receive an error message that includes the text of the string and the name of the sheet where the duplication is occurring.
📝 Note:
All the strings across the multiple sheets will be added to the same project's resource.
Please notice that if you use free syntax in one sheet and Transifex syntax in another, the sheet with the random syntax will be ignored.
Once you upload your content to Transifex, you can open your strings in the editor and view the sheet name for each string in the Developers Notes section.
💡Tip
Looking for more help? Get support from our Transifex Community Forum!
Find answers or post to get help from Transifex Support and our Community.