Inverting Glossaries in Wordfast Pro

From Wordfast Wiki
Revision as of 08:20, 31 May 2022 by Cheeseus (talk | contribs) (Modifying the language locale)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Below is a description of the procedure to invert a glossary (reverse its language combination), i.e. to turn, say a Dutch to English (United Kingdom) glossary, into an English (United Kingdom) to Dutch glossary. Basically, we export the glossary in the TBX format, then import it into a project with the reverse language pair. The import function will automatically select the source and target language.

Export the glossary in the TBX format

  1. Open the project whose glossary you want to invert.
  2. Go to the Project Terminology tab (in the Current Project view).
  3. Select the glossary that you want to invert.
  4. Click the Export Glossary button.
  5. The TBX format is selected by default. Click Browse... to choose a location to export the glossary to.
  6. In the Save As window that opens, give the glossary a name and then click Save.
  7. Back in the Export Glossary window, click OK.
  8. You will see the Export Glossary Report that mentions the number of exported terms. Click OK.

Import the TBX glossary in a new project

  1. Create or open an existing project that has the opposite language pair, e.g. English (United Kingdom) to Dutch.
  2. Import the TBX glossary that you exported above either in the Project Creation window (click the Glossary tab, then Import) or by going to the Project Terminology tab of an existing project and clicking Import Glossary.
  3. The TBX format is selected by default. Browse to where you exported the glossary from above.
  4. Choose whether to create a new glossary or to merge the glossary you are importing now with an existing glossary.
  5. If creating a new glossary, give it a name in the Create Glossary window, then click OK.
  6. The Importing Glossary window will be displayed with a progress bar. When the import process finishes, you will see an Import Glossary Report mentioning the number of imported terms.

NB! If you see 0 terms have been imported, the most likely reason is that the project languages (language + locale) do not match exactly those of the glossary. Note that English (United Kingdom) is not the same as English, nor is Dutch the same as Dutch (Netherlands).

Modifying the language locale

If you also need to modify the language locale, say change English (United Kingdom) into English (United States), you will need to edit the TBX glossary code. In order to do this, you will need a plain text editor such as the free Notepad++. The instructions below use Notepad++, but both the commands and the views should be almost identical in other plain text editors.

  1. Open the exported TBX in the plain text editor.
  2. You should see the following in the first line of code: <martif xml:lang="en-GB">
  3. Copy this first instance of en-GB by selecting it and then pressing CTRL + C (Windows) or CMD + C (Mac).
  4. Now press CTRL/CMD + H (this opens the Find & Replace dialogue window). The value for Find what should be filled in automatically with what you selected, but if not, type in it en-US.
  5. Type en-GB in the Replace with field.
  6. Click the Replace All button. All instances of the original language code will be replaced with the new. Your glossary will now be Dutch > English (United States) or English (United States) > Dutch, depending on the project you import it into later.

Note that you will still need to adjust the spelling of actual words in the glossary, e.g. colour > color.

Editing glossary notepad++.png