RWS Community
RWS Community
  • Site

Trados Go

Trados Studio

Trados Ignite

Trados Team

Trados Accelerate

Trados Enterprise

Trados GroupShare

Passolo

MultiTerm

RWS AppStore

Connectors

Beta Groups

Managed Translation

MultiTrans

TMS

Trados Enterprise

WorldServer

Language Weaver

Language Weaver Edge

Language Weaver Connectors

Language Weaver in Trados Studio

 

 

Content Champions

Tridion Docs

Tridion Sites

Contenta

LiveContent

XPP

Trados Go Ideas

Trados Studio Ideas

Trados Ignite Ideas

Trados GroupShare Ideas

Trados Team Ideas

Trados Team Terminology Ideas

Trados Enterprise & Accelerate Ideas

MultiTerm Ideas

Passolo Ideas

RWS Appstore Ideas

Tridion Docs Ideas

Tridion Sites Ideas

Language Weaver Ideas

Language Weaver Edge Ideas

Managed Translation - Enterprise Ideas

TMS Ideas

WorldServer Ideas

Trados Enterprise Ideas

XPP Ideas

GroupShare Developers

Language Cloud Developers

MultiTerm Developers

Passolo Developers

Trados Studio Developers

Managed Translation Developers

TMS Developers

WorldServer Developers

Tridion Docs Developers

XPP Developers

Language Combinations by Language Services

RWS Training & Certification

Style Guides

LDE Korean Vendor Support

RWS Campus

Trados Approved Trainers

Nordic Tridion Docs User Group

Tridion West Coast User Group

Community Ops

RWS Community Internal Group

AURORA

Internal Trados Ideas

Linguistic Validation

Mercury

QA Tools

RI Operational Excellence

Trados Inspired

XPP Cloud

Recognition & Reward System

RWS Community Platform Related Questions

Community Solutions Hub (Trados)

About RWS

Events

RWS Services: Train AI & others

RWS Training & Certification

To RWS Support

  • Search
  • Translate

    Detecting language please wait for.......


    Powered by
  • User
  • Site
  • Search
  • User
  • Developers
  • Trados Portfolio
  • Trados Studio Developers
  • More
  • Cancel
Trados Studio Developers

Trados Studio Developers > Studio Developers WIKI

How to edit the plain text from sdlxliff in Batch Task context
  • Home
  • Trados Studio developers forum
  • Studio Developers WIKI
  • Studio Developers Blog
  • More
  • Cancel
  • New
Show Translation Options

Detecting language please wait for.......


Powered by
Trados Studio Developers requires membership for participation - click to join
  • -Trados Studio API
    • Developer Licences
    • +Getting Started
    • -Knowledgebase
      • -How to...
        • How to create a project using public api
        • How to create a View plugin in Studio using WPF
        • How to sign an class library using Sdl Community key
        • -How to use Batch Tasks plugins
          • How bind a DataGridView to SettingsGroup
          • How to edit the plain text from sdlxliff in Batch Task context
          • How to insert a placeholder in Segment in Batch Task context
        • How to use Studio Ribbon Tabs
        • How to use Tell Me API
        • How to use the Studio Useful Tips service
        • +How to use the Translation Memory API
      • +Studio 2015
      • +Studio 2019
      • +Studio 2021
      • +Trados Studio 2022

You are currently reviewing an older revision of this page.

  • History View current version

How to edit the plain text from sdlxliff in Batch Task context

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);
}
}

Once we created the processor we need to add it to IMultiFileConverter object from ConfigureConverter method. 

protected override void ConfigureConverter(ProjectFile projectFile, IMultiFileConverter multiFileConverter)
{
multiFileConverter.AddBilingualProcessor(new BilingualContentHandlerAdapter(new YourCustomProcessor()));
}

Please make sure you override OnFileComplete() method in your application. If you don't override this method your changes on the file will not be saved.

public override bool OnFileComplete(ProjectFile projectFile, IMultiFileConverter multiFileConverter)
{
return true;
}

  • Our Terms of Use
  • Copyright
  • Privacy
  • Security
  • Anti-slavery Statement
  • Cookie Notice
  • YouTube