In this page we'll explain how to edit an sdlxliff from selected project in Batch Task plugin context. Like in previous documentation we'll also use Project Anonymizer plugin for code example. Full source code of the project can be found here .
When we want to edit an sdlxliff file we need a BilingualProcessor.
How to create a Bilingual Processor
1. Create a new class which inherits AbstractBilingualContentProcessor class.
2. Override ProcessParagraphUnit() method.
public override void ProcessParagraphUnit(IParagraphUnit paragraphUnit)
{
base.ProcessParagraphUnit(paragraphUnit);
if (paragraphUnit.IsStructure) { return; }
foreach (var segmentPair in paragraphUnit.SegmentPairs.ToList())
{
var segmentVisitor = new SegmentVisitor();
segmentVisitor.VisitText(segmentPair.Source);
}
}