XML provides tags around content that can be read by downstream routines to apply formatting. For example, <p> [paragraph] indicates that a new paragraph has started and the publishing routines can create a line break, if desired. In the localization industry, <p> is called an “external” tag because it is not inside the content. External tags differ from “internal” tags such as <b> [bold] or <i> [italics] which are used inside a sentence.

Tip: Don’t use inline elements for formatting unless you must

External tags are tags that are never touched in the translation process and are never part of a segment. Internal tags, on the other hand, such as <b>, may be inside a content segment that is being translated and may need to be moved when translating. This might be the case because the word order has changed in the target sentence or the element (such as bold) may not be appropriate in the target language. This makes matters more complex for translators.

Tip: Try to avoid using elements to highlight or format content

In general, best practice in XML is to avoid using tags that imply a specific formatting behavior and to instead use a tag that expresses a semantic element. For example, <emphasis> or <uicontrol> are mark-up which describe the type of content to which different kinds of formatting can be applied. Bold can be applied in one output and italics in another. This is particularly important in localization because some target languages have different rules about when to use bold and italics. For example, italics are almost never used with Asian languages such as Japanese since it destroys the aesthetics of the characters and makes them difficult to read.

For this reason, it is best to use a semantic element (such as <emphasis>) instead of an element that specifies formatting that may need to be changed in the target language. Text that needs to be semantically marked can be identified when writing the content, and is not dependent on the formatting preferences of the writer.

Don’t write:

<p>Click <i>Other Ways to Search</i> </p>

In this example, the Japanese translator will have to eliminate the <italics>. Instead, it would be preferable to do the following:

<p>Click <emphasis>Other Ways to Search</emphasis></p>

The style sheets can apply italics in English and bold in Japanese to the same XML structure.

Parents Comment Children
No Data