Hide / Unhide Text – Documentation

Hide / Unhide Text Tool icon Hide / Unhide Text tool makes it easy to hide text from your CAT tool when only parts of your document need to be translated or to convert non-translatable text into tags.

Detailed information about Hide / Unhide Text tool

How Hide / Unhide Text tool can help you in your work

  • Translate text added in a previously translated document: sometimes the customer provides a document where the text to be translated is inserted among existing text and marked with a specific color. Such text is often scattered around the document and it is difficult to extract it into a new document for translation. In order to translate this text and ignore all the other text, choose Hide everything except specific text, select Highlight Color or Font Color depending on the type of color used to mark translatable text, and choose the specific color from the dropdown list.
  • Create a dual-language document: if you need to deliver a dual-language document where the original text is next to its translation, the easiest method is to place a copy of the original text next to the original (by using a two-column table or a special delimiter like “/”), mark the copy with a specific color, and then hide the original using the Hide everything except specific text option of the Hide / Unhide Text tool. To prepare documents for dual-language translation quickly, you can use Dual Language Document Assistant tool.
  • Ignore specific parts of the document: sometimes you don't need to translate the entire document. For example, you may need to translate only specific sections while the remaining sections are still being revised. It is also common to skip standard sections which are identical in all customer documents. In this case mark all non-translatable parts with a certain highlight color or font color, choose the Hide specific text only option, select the right color, and click the Hide Text button.
  • Translate complex text-based formats containing non-translatable text: There are a lot of different pure-text formats which contain special non-translatable content. Some of this content is outside the translatable lines and should be completely hidden from the CAT tool, while other elements may appear on the same line as the translatable text and should be converted into tags inside the CAT tool. Such formats include SRT (SubRip Text) subtitles, STL subtitles, HTML, XML, RESX, C#, Javascript, Markdown, etc. If your CAT tool has a built-in filter for this format, it is highly recommended to use this filter. However, if there is no built-in filter for this format or the existing filter has its shortcomings, you can create a list of search expressions to find all non-translatable text and then hide this content in order to ignore it or convert into tags inside the CAT tool. In order to do this, choose Hide specific text only, add relevant search entries to the list, and optionally choose to highlight the found text using the Also highlight found text checkbox in order to identify this text easily. Hide / Unhide Text tool already contains several predefined lists for processing SRT, HTML and XML files (see the section above).
  • Hide sensitive parts of the document: you can hide specific names and numbers and then import the document into your CAT tool. The hidden text will be converted into tags. Some CAT tools do not display the content of these tags to the translator, and it is also possible to export the file to XLIFF format and import it into another CAT tool which will hide the content of these tags. You can use this workflow with some CAT tools only, so you should test it beforehand.
  • Skip specific parts of a document – sometimes the customer does not want to translate textboxes, comments, headers/footers, etc. In this case you can select the Hide specific text only option and choose these content types in order to hide them from the CAT tool.
  • New in version 1.2: you can process multiple Word documents with Hide / Unhide Text tool by using Document Processing Tool. Click here for more information about this tool.

Download TransTools+ brochure to see real-life examples of how Hide / Unhide Text tool and other TransTools+ features can help you increase quality and productivity.

Where to find the tool

To run Hide / Unhide Text tool, click the Hide / Unhide Text button on the TransTools+ tab:

The Hide / Unhide Text button on the TransTools+ tab

This will open Hide / Unhide Text tool pane to the right of the current document.

Hide / Unhide Text pane

Using Hide / Unhide Text tool

How the tool “hides” text from your CAT tool

Most CAT tools provide a way to skip non-translatable text in Word documents or display it as tags if this text is marked with special formatting. For most CAT tools, this is “Hidden Text” font attribute. By using this feature, you can skip original text in dual-language documents where two languages should appear side by side, translate new text added in a previously translated document, skip non-translatable text in various text-based documents such as subtitles or scripts, or convert various placeholders into tags in localization documents.

Hidden text in MS Word

How hidden text is displayed inside Microsoft Word

Main options

Scope: Select Entire Document to process the entire document, including headers / footers, comments, footnotes, etc. Select Selection to process selected text only.

What do you want to do? – the tool provides 3 ways to process a document:

  • Hide everything except specific text – when this option is selected, the tool leaves the found text visible, but hides everything else. This option is commonly used to translate text formatted with a certain color.

  • Hide specific text only – when this option is selected, the tool hides all found text and leaves everything else visible. Use this option if the customer marked non-translatable text with a specific color, or if you want to skip specific parts of the document or convert them into tags in your CAT tool.

    This option has additional options:

    Additional options for hiding specific text

    When you click the (options) link, you will see the following window:

    Changing additional options for hiding specific text

    By default, if the document already contains hidden text, Hide / Unhide Text tool remembers where this text is located and clears its hidden formatting before hiding text according to your options (the hidden formatting is restored when you run the tool with the Unhide everything option activated). This way you can translate this text in your CAT tool if necessary. However, in some cases you will need to run Hide / Unhide Text tool several times, and in such cases you will want to preserve hidden formatting which was applied during previous hiding operations. In such cases, use the second option called Do not clear existing hidden formatting....

  • Unhide everything – use this option after the translated document is generated to unhide all the text in the document.

Hide text using... / Text was hidden using...: While most CAT tools consider hidden text as non-translatable, some CAT tools do not. In addition to hidden text attribute, you can choose “Marching Red Ants” and “Double Strikethrough” formatting, which are supported by Wordfast Classic as non-translatable text attribute.

Hiding options – the tool can find the text that needs to be hidden in 3 different ways: based on text color, based on search expression matches, and based on its location.

Hide Text / Unhide Text – this button hides the text in the document based on the options, or unhides all text in the current scope, depending on the selected action.

Hiding options – Hide text based on its color

To hide text based on its color, select Hide text based on its color from the Hiding Options dropdown list:

Options for hiding text based on its color

If the text to be hidden / translated has color highlighting, select Highlight Color and then choose Any Color for any highlight color or pick a specific color from the dropdown list.

If the text to be hidden / translated has a specific font color, select Font Color and then choose the specific font color from the list.

If the color is not in the list or it is difficult to find the right color inside the list, you can select the text that has the right color inside the document and then choose Selection Color from the dropdown list. This will copy the color from the document.

If the text that needs to be hidden or translated is marked in several different colors, you can select multiple colors. To do this, first select a specific color in the dropdown list and then check the Use Multiple Colors checkbox. When you do this, you will be able to add colors to the list using Add button, or remove individual colors using Remove button. Uncheck this checkbox if you want to use a single color or leave a single color in the list.

Hiding options – Hide text based on search expression matches

To hide text based on specific text matches found inside the document, select Hide text based on search expression matches from the Hiding Options dropdown list:

Options for hiding text based on search expression matches

In this mode, the tool finds the text that matches the search entries in the list. There are two types of search entries: standard text entries (Text search) and regular expression entries (Regular expression search):

  • Standard text entries describe the parameters for finding text using Microsoft Word’s text search options.

    To use standard text search, select the Text option button in the Entry Editor.

    In the Find What field, enter the text search string. You can insert special symbols such as ^l for manual line break by clicking Insert... button or typing the appropriate code. To make the expression easier to read, you can change the font size by clicking the buttons to the right of the Find What field.

    Check the Match Case checkbox to perform case-sensitive text search.

    Check the Find Whole Words Only checkbox if the text must match full words, i.e. without spanning only part of a word. For example, this is useful for finding the singular form of a noun: if you enter “spider” and check the Find Whole Words Only checkbox, the tool will find “spider”, but not “spiders”.

    Check the Use Wildcards checkbox if you want to use Word’s special wildcard symbols. When this checkbox is checked, Insert... button allows you to insert special wildcard codes.
    Note: although some people use the name “Word regular expressions” to call Word wildcards, these are very different from .NET regular expressions and you should be careful not to use .NET regular expressions for Text search expressions or Word wildcards for Regular expressions.

    In the Description field, you can add a short note to make it easier to understand what kind of text will be found by the expression.

    Standard text search

    Use the Disable this entry in the search expression list checkbox in order to skip the search entry during search/replace operations without removing it from the list. In the search expression list, disabled entries have strikethrough style:

    Disabled entries

  • Regular expression entries describe the parameters for finding text using Microsoft .NET regular expression mechanism. NOTE: The search is conducted in each individual paragraph, so this type of search can only be used when the match (i.e. text described by the regular expression) does not span several paragraphs, i.e. it is located inside a single paragraph.

    To use regular expression search, select the Regular Expression option button in the Entry Editor.

    In the Find What field, enter the search string. You can insert regular expression operators and constructs by clicking Insert... button. To make the expression easier to read, you can change the font size by clicking the buttons to the right of the Find What field.

    Uncheck Match Case checkbox if the regular expression must be case-insensitive (regular expressions are case-sensitive by default).

    If your regular expression contains a capturing group, you can match the text found by this capturing group instead of the text found by the entire regular expression. To do this, check “Find capturing group” checkbox and then select the sequential number of the group from the dropdown list.

    In the Description field, you can add a short note to make it easier to understand what kind of text will be found by the expression.

    Regular expression search

    Use the Disable this entry in the search expression list checkbox in order to skip the search entry during search/replace operations without removing it from the list. In the search expression list, disabled entries have strikethrough style:

    Disabled entries

    To test how your regular expression will behave, click the Test regular expression search/replace button below the Find What or Replace With fields. This will open the Regular Expression Testing Ground window where you can modify the regular expression or its parameters and see how it will perform on sample text:

    Regular Expression Testing Ground

    Once you enter sample text in the Sample Text To Search In area, search matches will be highlighted in color and the replacement results will be displayed in the Sample Text After Replacement area.

Editing the search entries:

  • Click the Add button to add a new entry to the current list.
  • Click the Add Multiple button to add several entries at once using a special window:
    Add Multiple Entries window
    Using this function, you can create multiple entries that share the same search parameters but have different Find What and Replace With text.
  • Click the Duplicate button to edit a copy of the selected entry in the Entry Editor window before adding it to the list.
  • The Edit button allows you to edit the selected entry.
  • The Batch-edit parameters button allows changing specific parameters of all selected entries without having to edit each one separately.
  • The Remove button removes selected entries.
  • The Clear button removes all entries currently displayed in the list.

You need to click the Save button in order to record these changes in the file where the appropriate list is stored.

Note: you cannot edit entries in internal lists whose names start with ‘(TransTools)’ – they are provided as part of TransTools+ installation and cannot be modified. However, you can export them to another list and then make all the necessary changes there.

To create a new list, make sure that [New List] is selected in the dropdown list, then add entries using the Add or Add Multiple buttons, or import entries from another list, external file or clipboard by using the Import button. Then save the changes using the Save button or export the search entries by clicking the Export button. An alternative method is to click the Create New List button located to the right of the dropdown list, assign a name to the new list, and then add entries to it as specified above.

To use search entries from an existing list, select the list from the dropdown list, or click the right-most button (Open) to open a list stored in an external file.
Tip: If you need to perform a search/replace operation using specific search entries rather than all the search entries, simply select the appropriate entries, right-click and select “Disable all except selected entries” from the right-click menu. The changes will not be recorded in the appropriate list file unless you click the Save button.

To make changes to an existing list, simply select the list from the dropdown list or click the Open File button on the right-hand side to load an external file. Make the appropriate changes and then click Save button to update the corresponding file on disk.

In order to copy search entries from one list to another or from / to external applications like Microsoft Excel, you can use Import and Export buttons:

  • Import button loads search entries from a named list file, external file or clipboard and places them at the end of the list:
    Load list window
    If you choose the Import from clipboard option, you need to make sure that the text located on the clipboard is in the correct format (you can save an existing list to clipboard to see the expected format).
  • Export button copies the current search entries to a named list file, external file or clipboard:
    Save list window
    If you export to an existing list in the tool's internal configuration file, the contents of the file will be overwritten with current search entries.

You can test whether the tool can find correct text by clicking Find Next Match button. The tool will find the first match after the current selection point, wrapping to the beginning of the document if it reaches the end of the document.

You can also highlight found text in order to see which text was found during the hiding operation or to manipulate this text later. To do this, check the Also Highlight Found Text checkbox and then select the highlight color from the dropdown list:
Highlight found text option

If there is an overlap between two matches for different search entries, the earlier match is kept and the later match is discarded.

Predefined lists

Hide / Unhide Text tool is provided with several pre-defined lists of search expressions which you can use to prepare documents for translation. The following lists are provided:

  • SRT (SubRip Text) files – this list uses a number of regular expressions to hide non-translatable text (time codes and formatting codes) in SRT subtitles. To translate such subtitles, copy the text from an SRT file or open it inside Microsoft Word, load this list, then select the Hide specific text only option and click the Hide text button.
  • HTML and HTML - Translatable attributes – these lists use several regular expressions to hide non-translatable text in HTML files. If you want to translate HTML files, you will need to follow these steps to make sure that all non-translatable text is hidden correctly:
    1. Select the Hide specific text only option. Clear the entry list, load pre-defined HTML list by clicking Load... button, check the Also Highlight Found Text checkbox and select Red highlight color. Click Hide Text button to highlight and hide the found text. This action will highlight HTML tags and entities using Red color.
    2. Select the Hide specific text only option. Clear the entry list, load pre-defined HTML - Translatable attributes list by clicking Load... button, check the Also Highlight Found Text checkbox and select Bright green highlight color. Click Hide Text button to highlight and hide the found text. When you see the Hidden Formatting Warning window, leave the first option selected and click Continue. This action will highlight translatable text inside HTML tags using Bright Green color.
    3. Go through the document and mark additional non-translatable text using Red highlight color. For example, you will need to mark all text from <head> up to </head> at the top of the document, leaving existing Bright Green text untouched.
    4. At this point, all non-translatable text will be hightlighted in red. Select the Hide specific text only option and select Hide text based on its color from the Hiding Options dropdown list. Choose the Highlight Color option and select Red from the dropdown list. Click Hide Text button. When you see the Hidden Formatting Warning window, leave the first option selected and click Continue.
    5. Now all non-translatable text will be hidden and the document will be ready for CAT tool import. NOTE: This procedure hides HTML entities such as &nbsp; (non-breaking space), &rdquo; (”), etc., turning these sequences into tags in your CAT tool. It is better to replace these characters with the actual symbols as the very first step, and convert them back to HTML entities when the translation is finished.
  • XML – this list uses a number of regular expressions to hide non-translatable text in XML files. To translate such files, copy the text from an XML file or open it inside Microsoft Word, load this list, then select the Hide specific text only option and click the Hide text button. NOTE: Translatable attributes inside XML tags will be hidden, so if you want to translate them, you can use a multi-step procedure similar to the above procedure for HTML files.
  • Non-translatable paragraphs – this simple list allows you hide paragraphs that consist entirely of non-translatable text such as numbers without decimal point or thousand separators. Naturally, such paragraphs will hinder translation, especially if there are a lot of them, so it is a good idea to hide them. You can extend this list with your own custom expressions. To hide non-translatable paragraphs, load this list, then select the Hide specific text only option and click the Hide text button.

Hiding options – Hide text based on its location

To hide text based on its location, select Hide text based on its location from the Hiding Options dropdown list:

Hide text based on its location

The tool supports 7 types of content in Microsoft Word documents: document body (where almost all text is normally placed), comments (comment balloons next to commented text), footnotes, headers and footers, textboxes, endnotes, and tables (tables are supported in v. 2.1 and newer versions). These options should be used to mark content in specific areas as hidden or non-hidden. For example, you can mark all headers and footers as hidden in order to skip them during translation.

The Tables option allows you to mark table text as hidden or non-hidden. This option is very useful for localization tables containing translatable text in specific columns, e.g. inside “Translation” column. When the Tables option is selected, all the other options become disabled — this means that Hide/Unhide Text tool will search for tables in the entire document (including headers, footers, textboxes) and will ignore the other location options.

Tables option

The Tables option has a number of configuration settings which are accessible by clicking the Edit button next to the options summary field below the Tables checkbox. When you click this button, you will see the following configuration dialog:

Table content hiding options

The above screenshot indicates the settings for marking translatable text located in all tables containing exactly 4 columns, in a column with “Translation” written in the first row (column header cell), in any row starting from row 2, and for applying yellow highlight color to the marked text. These settings can be applied during preparation of some commonly requested localization documents similar to the following sample:

Sample translatable text in a commonly requested localization file

The following settings are available via the Table Content Hiding Options dialog:

  1. What kind of tables to process: this setting has 3 options - All tables, Tables containing a specific minimum number of columns and Tables containing a specific exact number of columns. By using this setting, you can decide which tables contain text to be marked as hidden or non-hidden. You must specify the exact or minimum number of columns if you select the second or third options in this list.
  2. Columns containing text to mark as hidden/non-hidden: this setting enables you to specify where the text is located. You can specify All columns if the text is located in any column, or Specific columns if the text is located in particular columns. When the Specific Columns option is selected, you can add, edit or remove columns with the buttons next to the list:
    Column settings
    With the Add button, you can add two types of columns: Column which has specific text in the header row and Column which has a specific ordinal number:
    • Column which has specific text in the header row — use this option if the text to be marked as hidden/non-hidden is located in a column whose first row contains specific text. For example, localization tables often contain the text “Translation” in the first row. Type the text and use the checkbox to indicate whether the text must match exactly (case-sensitive search) or if upper-case and lower-case letters are considered identical (case-insensitive search):
      Adding a column which has specific header text
    • Column which has a specific ordinal number — use this option if the text to be marked as hidden/non-hidden is located in a column which has a particular ordinal number. You can indicate one column or a range of columns:
      Adding a column which has a specific ordinal number
  3. Rows containing text to mark as hidden/non-hidden: this setting has 2 options — All rows if the text is located in any table row and Specific rows if the text is located in a range of rows.
    Row settings
    Use the 2nd setting if you need to skip the header row by indicating “2” as the start row. In the End Row field, you can indicate 1000 or 10000 when the table must be processed up to the end, since it is very rare for Word localization tables to contain more than 1000 rows.
  4. Also apply a highlight color to the marked text: when this checkbox is checked, a highlight color will be applied to the text marked as hidden/non-hidden, making it easier for you to see which table text was affected and allowing you to concentrate on it. When using this setting, make sure that the text does not have an existing highlight color, unless you can restore this color later or it does not need to be preserved.

Note that the Tables option is available in version 2.1 and newer versions of TransTools+.


Tools for partial (selective) translation

TransTools

  • Hide / Unhide Text – mark text as non-translatable in order to hide it from your CAT tool

Tools for dual-language translation

TransTools+

TransTools

Formatting tools

TransTools+

  • Highlighting Tool – simplify editing work: apply color highlighting, clear color highlighting, or find color highlighting

Batch tools

TransTools+

  • Document Processing Tool – perform various actions on multiple Word documents (DOCX, DOC, RTF format), using one or several different TransTools+ commands one after the other.