Translating Excel Files with Wordfast Pro
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:
- Download a template XML file here.
- Open the Excel file to be translated to identify what needs to be translated. Keep this open while configuring the XML file.
- Open the excelConfig.xml template file using a text editor. We recommend the free TextWrangler for Mac or Notepad++ for PC.
- 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.
- 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. 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.
- Copy and paste the following regular expression between the <regexp> and </regexp> tags to convert embedded HTML tags into Wordfast tags: <[^>]*>
- The next section (under <!-- worksheet configuration can be placed here -->, row 17), is used to specify for each or every sheet:
- What row the translation should start and end on
- Which columns should be translated and if the translation should be placed in the same or another column
- If the number of characters per cell in a column should be restricted
- 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.
- Save your XML Configuration file once finished and use it to create a new XLS or XLSX filter in Wordfast Pro 5:
- At the Project List view, click on Preferences (or press F9).
- Under the New Project Preferences section, click on Filters.
- Click on the Add button.
- Choose the format of the Excel file you need to translate (XLS or XLSX).
- Name your filter something that is easily recognizable and that you can remember.
- Tick all boxes that correspond to true using in the XML configuration file
- Browse to load your XML Configuration file.
- Click on OK.
- Click on OK to close the Preferences window and save your settings.
- Use the advanced wizard to create a project.
- 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).
- 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.
- 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.
- Author's note: DOUBLE CHECK with developers whether this is necessary or if the XML configuration overrides all options by default.
- If you regularly need to use this newly created filter, you can set it as default before closing the Preferences window.
--John 11:22, 18 April 2017 (CEST)