Uploading a Glossary
If you already have a glossary, you can import it to Transifex by uploading a CSV file with the terms. Your file can be used to create a new glossary or update an existing one.
To ensure data from your glossary will be correctly mapped to Transifex, you'll need to structure your CSV file in a specific way. Here's an example of a file that can be successfully imported:
term, pos, comment, el, pt_br Translation, noun, The process of translating text from one language into another, μετάφραση, tradução
The first row of your CSV file should have all the headers (term, pos, comment, language code). It is not mandatory to fill in the "pos" and "comment" columns, you can only fill in the "term" and the corresponding "language code" column which is where translated terms will be placed.
Here's what the columns and column headers mean:
- Term – The word or phrase you're adding to the glossary. The term should be in the same language as the source language of the project(s) you'll be using the glossary with.
- POS – Part of speech. The accepted values are: Noun, pronoun, adjective, verb, adverb, preposition, conjunction, and interjection. This column is not mandatory to fill in.
- Comment – Any notes you want to add about the source term. This column is not mandatory to fill in.
- el – The translation for the term in the first column. Everything in this column should be in the same language. The header is simply the language code of the language that the translation is in. So if you have French (“fr”) as a target language in your project(s), you should put “fr” in the header. Similarly, if your target language in the project(s) is French (France) (fr_FR), then the header should read “fr_FR”.
- comment_el – Any notes you want to add for the specific target language. Similarly, be careful with the language code - it should be exactly the same as your target language.
To include translations for additional languages, simply add more columns with the language code as the header.
Terms with a comma (ex "Transifex Live, a Transifex solution") are handled fine if the glossary is created/updated using Google Spreadsheets.
Once imported, the term will look like this inside Transifex:
Inside the Editor, only words that exactly match a glossary term will be highlighted. For example, if your source string was the word "Translation" and the glossary term was "Translation," the source string would be highlighted in the editor. However, if the glossary term was "Translations" (plural), the source string would not be highlighted because it doesn't match the glossary term.
Sometimes it's useful to use a spreadsheet to create and format a Glossary and then save it as a CSV file. You should make sure that the exported file is encoded in UTF-8. Recent versions of Excel support exporting CSVs in UTF-8, but it's hard to be sure they did it correctly. You can use an editor like Atom or Sublime and open the file with the right encoding and check if the characters look OK.
To be sure, we recommend using Google Spreadsheets, which handles the exporting perfectly.
If you already have an Excel file, you can upload/open it with Google Spreadsheets and export it into a properly-encoded CSV from there.
This solution also fixes the case where your upload fails with the following message: "new-line character seen in unquoted field - do you need to open the file in universal-newline mode".
When you have term that appears twice in your CSV file with the same part of speech but different comments or translations, Transifex will only upload the second instance of the term. The first will be ignored.
term, pos, comment, fr Account, noun, A report or description of an event or experience, Compte Account, noun, A statement of financial expenditure and receipts for a particular period or purpose, Compte
To add two instances of a term to the glossary, add a
(1) after the second instance of the term, as follows:
term, pos, comment, fr Account, noun, A report or description of an event or experience., Compte Account (1), noun, A statement of financial expenditure and receipts for a particular period or purpose, Compte
Only the first instance of the term will appear in the Editor. However, both instances will be available from within the Glossary itself. So in case you want your translators to be aware of the different ways that a term could be translated to, you can ask them to check the glossary.
Once you've formatted your CSV file, upload it to Transifex to create a new glossary:
Head to your Organization Settings from the main navigation.
On the left menu, click on Glossary.
Click the Add glossary button near the top right.
In the popup, give your glossary a name and select the source language of the glossary terms. Again, be careful with choosing the right source language: it should be consistent with the existing source language in your project(s). If you have English (United States) as your target language, make sure to choose English (United States) here as well (and not generic English, for example).
Choose from your computer the file you want to upload.
Hit Save to add the glossary to Transifex.
After creating the glossary, you'll need to associate a project with it.
Kindly check the following things are done correctly, in order to successfully upload the glossary:
Encoding is correct: should be UTF-8 (Read more about the encoding here)
If there are duplicate terms, they are distinguished as unique entries. (Read more here)
All necessary columns (term, POS, comment etc.) are present (as described here).
Source and target language codes match exactly the source and target languages of your project.
When uploading the glossary, the correct source language code is chosen - the same as in your project.
No need to upload the same glossary for multiple languages - you can just add columns for those multiple target languages in your csv file.
The glossary is associated with the project(s).
Glossaries in Transifex can also be updated via a CSV file.
To update an existing glossary
Head to your Organization Settings from the main navigation.
In the list of glossaries, find the one you'd like to update and click Gear icon .
Choose from your computer the glossary file you want to upload.
Check the box next to Overwrite existing entries if you want update any existing glossary terms in Transifex and add new terms from your CSV file.
Hit Save to add to update the glossary.