Translating Excel Files with Wordfast Pro 5

From Wordfast Wiki
Revision as of 19:38, 21 January 2019 by Star (talk | contribs)
Jump to: navigation, search

Wordfast Pro 5 has not yet implemented an Excel import wizard. Until this is done, you have three options when importing Excel files for translation.


Extract all content for translation

This is the default setting of the Excel filter. Simply add an Excel file to a project and all of its content will be extracted for translation.


Modify the Excel filter or the file to specify content for translation

Before importing your Excel file, you can modify the default Excel filter (XLS and/or XLSX) in the Wordfast Pro 5 Preferences > Project Preferences > Filters to specify the content that needs to be extracted for translation. You may also want to pre-process the Excel file before importing. For example, you might be asked not to translate certain sheets but your client has not hidden them for you. Here is a list of extraction options that can be selected or deselected:

  • Extract sheet names
  • Skip cells with formulas
  • Skip hidden rows or columns
  • Treat numbers stored in text format as real numbers, which means they won't be extracted since numbers are non-translatable.
  • Translate data validation comments
  • Translate hidden sheets
  • Translate cell comments
  • Translate dropdown lists
  • Extract cells in column order (segment ordering would be A1, A2, A3, B1, B2, B3 as opposed to A1, B1, A2, B2, A3, B3)
  • Extract soft return strategy (set by default to be interpreted as a tag)


Use an XML configuration file

This is definitely the most complex way of specifying content to be extracted for translation. In time, the import wizard will be implemented which can be used instead of this method. To use an XML configuration file:

  1. Download a template XML file here.
  2. Open the Excel file to be translated to identify what needs to be translated. Keep this open while configuring the XML file.
  3. Open the excelConfig.xml template file using a text editor. We recommend the free TextWrangler for Mac or Notepad++ for PC. Excel XML Configuration file
  4. The first section (under <!-- Configuration for Excel filter (ConvertXLS) -->, row 4), contains default settings that are familiar from the Excel filter options in the Wordfast Pro 5 Preferences. You can change true to false or false to true depending on what you want.
    1. If your Excel file contains HTML tags such as <b> for bold, <i> for italics, etc., you should convert said HTML tags into Wordfast tags.[1] Otherwise, they will be extracted as translatable text and will be a pain to replicate in Wordfast. Moreover, they will pollute your TM with non-sensical codes.
    2. Copy and paste the following regular expression between the <regexp> and </regexp> tags to convert embedded HTML tags into Wordfast tags: <[^>]*>
  5. The next section (under <!-- worksheet configuration can be placed here -->, row 17), is used to specify for each or every sheet:
    1. What row the translation should start and end on
    2. Which columns should be translated and if the translation should be placed in the same or another column
    3. If the number of characters per cell in a column should be restricted
  6. If different sheets in the workbook require different configurations, copy the entire section between the <sheet> and </sheet> tags (rows 19 and 48 in the image above) and paste it as many times as necessary under the </sheet> tag.
  7. Save your XML Configuration file once finished and use it to create a new XLS or XLSX filter in Wordfast Pro 5:
    1. At the Project List view, click on Preferences (or press F9).
    2. Under the "New Project Preferences" section, click on Filters.
    3. Click on the Add button.
    4. Choose the format of the Excel file you need to translate (XLS or XLSX).
    5. Name your filter something that is easily recognizable and that you can remember.
    6. Tick all boxes that correspond to true using in the XML configuration file[2]
    7. Browse to load your XML Configuration file.
    8. Click on OK.
    9. Click on OK to close the "Preferences" window and save your settings.[3]
  8. Use the advanced wizard to create a project.
  9. In Step 3, after adding your Excel file, select the appropriate filter under the Type column (unless you have specified your XML configured filter as default).
  10. Complete the wizard to create a bilingual file and begin translation.


Note: Any text between <!-- and --> is only there to help you. You can leave it in the file or you can delete it; this will not affect how the Excel content is extracted.


Click to download a sample Excel file and its corresponding XML configuration file.


Version: Wordfast Pro 5.7 Operating System: macOS

Notes

  1. This usually happens when web content has been extracted from a website into an Excel file and the translation will be re-imported later from the Excel file.
  2. Author's note: DOUBLE CHECK with developers whether this is necessary or if the XML configuration overrides all options by default.
  3. If you regularly need to use this newly created filter, you can set it as default before closing the Preferences window.

Updated by Star 15 January 2019 (CEST)