Click or drag to resize
Handling Tags During Segmentation

In this chapter you will learn how to process tags that appear at the beginning or end of a segment.

Change the Way the Segmentation Treats Tags

A tag such as IMG may appear right in front or after a segment, i.e. the parser might have to deal with leading or trailing inline tags. You should always try to display as few tags as possible in order not no clutter the editor view unnecessarily. This is why leading and trailing tags are not displayed in the editor of SDL Trados Studio 2014 by default.

For example, the following leading IMG tag would not be shown in the editor view, however, the sub-segment content would be displayed:

<img src="button.jpg" alt="Open dialog box" /> Click the Open Dialog box button to open the dialog box.

Output in the editor of SDL Trados Studio 2014:

The user could set the display filter to show all content (by selecting All content from the Display dropdown list). In this case the leading tag is shown in a separate row in the editor:

However, you can change this behavior as required through the SegmentationHint property of the placeable properties object. Unless otherwise defined, the property value is Undefined. This means that the default segmentation behavior will be applied, which means that leading and trailing tags will not be shown, as SDL Trados Studio 2014 tries to minimize the number of tags displayed, which is usually more translator-friendly.

You can, however, set the segmentation hint property to Include, if you want to make sure that such tags are shown in the same segment as the actual text, e.g.:

C#
placeProperties.SegmentationHint = SegmentationHint.Include

You could also apply the value IncludeWithText, which means that tags are not shown unless they contain localizable text. In our example the IMG tag will be shown, if it contains localizable text in the ALT property, but it will not be displayed, if the ALT attribute is missing.

See Also
Community
Edit
Be the first to Edit the community content of this topic.
Comments