End users

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Tag-Handler

This refers to how tags are passed to the various services such as Deepl, Google, OpenAI, etc. Some services do not deal well with the tags commonly used in XLIFF. Therefore, these tags are converted into a different form before transmission. Unfortunately, there is no one-size-fits-all solution that works equally well for all services.

In addition to that, we have downstream repair routines for all types of Tag-Handler. These repair routines attempt to correct formal errors in the return of a service. For example, incorrect tag order, incorrect nesting, missing tags or the like.


Example

Here is a small example of how Tag-Handler works in Translate5

Original-Text:

Code Block
<strong>Hallo Welt</strong>

in Xliff:

Code Block
<bpt id="1" ctype="x-strong">&lt;strong&gt;</bpt>Hallo Welt,<ept id="1">&lt;/strong&gt;</ept>

looks like this in Translate5:

Code Block
<1>Hallo Welt,</1>


And this is what will be sent to the services for the different Tag-Handler settings:

remover:

Simply removes all tags. Will often bring good translation results but, well, you do not have any tags afterwards.

sent text:

Code Block
Hallo Welt,

html_image:

will replace all tag-structures with <img ...> tags, which are well known in HTML. This is always a good idea for services who can handle HTML better than XML or other formats.

sent text:

Code Block
<img id="t5tag-start-1" src="example.jpg" />Hallo Welt,<img id="t5tag-end-1" src="example.jpg" />


xlf_repair:

this is a more XML-like approach. Tag-structures are replaced with simpler tags. Services that deliver better results for XML structures should use this setting.

sent text:

Code Block
<bx id="1" rid="1" />Hallo Welt,<ex id="2" rid="1" />


xliff_paired_tags:

we found out that some services could not handle tag attributes in a correct way. Therefore we added this replacement with tags that do not need any attribiutes.
Currently this is our favourite proposal for most of the services.

sent text:

Code Block
<t5x_1_1>Hallo Welt,</t5x_2_1>


Whitespace Handling

General

...