Placeholders

About placeholders

Often, translations include complex tags that should not be translated. To prevent translators from translating this information, Google Translator Toolkit replaces such text with placeholders.

For example, consider the source HTML text:

The < font style="font-weight:bold" color="red" >second< /font > word in this sentence is in bold and red.

which is displayed as:

The second word in this sentence is in bold and red.

To simplify this text and to prevent translators from translating this information, we do not show the original tags in the translation as:

The < font style="font-weight:bold" color="red" >second< /font > word in this sentence is in bold and red.

Instead, we replace these tags with placeholders:

The {0}second{/0} word in this sentence is in bold and red.

There are two types of placeholders:

  • Standalone placeholders, shown as {#/}, where # is the position of the placeholder relative to other tags in the segment. For example, if the placeholder is the first placeholder in the segment, it is shown as {1/}; similarly, the second placeholder is shown as {2/} and so on.
  • Paired placeholders, shown as opening {#} and closing {/#}, where # is the position of the placeholder relative to other tags in the segment. Sample paired placeholders include HTML links, e.g., <a href="http://www.google.com"> and </a>, which may be shown as {1} and {/1}.

Translators are free to move around or even remove placeholders as needed to ensure the correct translation for the current segment.

Placeholder menu

When you translate a segment that contains a placeholder, Google Translator Toolkit automatically shows the Insert HTML tags drop-down list for HTML and other rich text:

Open the drop-down list to view the placeholder text.

show HTML tags drop-down

Click any single tag to paste the tag into the current segment. Or type the tag text directly into the segment.

Placeholder context

Sometimes, placeholders may be ambiguous or difficult to place in the document. For example, consider the HTML text:

Click <a href="docs.google.com">here</a> for Docs and <a href="www.gmail.com">here</a> for Gmail.

which is displayed as

Click here for Docs and here for Gmail.

In this example, the placeholder menu would show:

Insert link: {0}here{/0}
Insert link: {1}here{/1}

To get more context for where to add placeholders into the text, hover your mouse over the placeholder to see the context around the tag. For example, if you hover your mouse over the first 'Insert link,' the tooltip will show:

Click {0}here{/0} for Docs and here f

where 'Click' represents the 20 (or fewer) characters that precede the opening placeholder, and ' for Docs and here f" represents the 20 (or fewer) characters the follow the closing placeholder.

html tooltip

Similarly, if you hover your mouse over the second 'Insert link,' the tooltip will show:

k here for Docs and {1}here{/1} for Gmail.

html tooltip