Transifex

  • Documentation
  • Translation Quality Tools
  • Uploading a Glossary

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.

Formatting your CSV file

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 look similar to the example above. 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.
  • Comment – Any notes you want to add about the term.
  • 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 (in the example above, it's "fr" for French).
  • comment_el – Any notes you want to add for the specific target language

To include translations for additional languages, simply add more columns with the language code as the header.

Once imported, the term will look like this inside Transifex:

glossary-view.png#asset:770


Note

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.

Correct encoding for CSV files

Sometimes it's useful to use a spreadsheet to create and format a Glossary and then saving as a CSV file. You should make sure the exported file is, indeed, 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 load it in Google Spreadsheets, just to 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".

Duplicate terms in your CSV file

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.

Example:

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.

Uploading your CSV file

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 you glossary a name and select the language of the glossary terms.

    glossary-add-popup.png#asset:864

  • 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.

Updating an existing glossary

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.

  • 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 settings_color.png#asset:1107.

  • Choose from your computer the glossary file you want to upload.

    glossary-edit-popup.png#asset:876

  • 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.