In this tutorial we'll be explained how to insert a Tag in Translation Unit. At this point we assume the user knows how to set up the project and how to implement Segment Element Visitor pattern.
For more information about the Segment Element Visitor please read first this tutorial.
Please keep in mind this tutorial will modify your Translation Memory and this might produce unwanted results.
Complete sample code can be found on Github.
What we want to achieve:
Bellow you can see an example in Debugger how elements from source segment looks like:
For example if we want to replace the email address at position 4 with a tag we need to do the following:
var tag = new Tag(TagType.TextPlaceholder, string.Empty, 1); (Tag object is found in Sdl.LanguagePlatform.Core.dll )
var tag = new Tag(TagType.TextPlaceholder, string.Empty, 1)
For more complex example segment element visitor pattern should be used.