Open sdlxliff files

I’m creating a .NET application that requires to open/read sdlxliff files created in SDL Trados Studio and then

retrieve all the translated strings.

I already downloaded and installed SDL Trados Studio 2011 SDK but cannot find any function there to read sdlxliff files.

I’ve been browsing the information available in SDK OpenExchange but couldn’t find any clue.

Can somebody provide advice on how to implement it on C#?

 

Regards,

Marco

 

Parents Reply
  • Hi Romulus,

    I am sorry I read your reply and code you shared several times but it is not clear. I got application working to read SDLXLIFF using

                      var mgr = DefaultFileTypeManager.CreateInstance(true);
    
                       var bilingualFilePath = file.FullName;
    
                       var conv = mgr.GetConverterToDefaultBilingual(bilingualFilePath, null, null);
    
                       var test = new AnalyseSdlxliff();
    
                       conv.AddBilingualProcessor(test);
    
                       conv.Parse();

     

    But I found that there are two issue when I would like to do Search and Replace.

    1. Is it output file needed? Is there any way how to update the input file directly? This way is slowing down whole performance of small and easy to way use application.

    2. If the output file is written the header of file is not same as in input file.

    a)

    input file: cmt-def id="536440a5-9af2-41be

    output file: cmt-def id="a6a9e4f8-3e4c

    b)

    Input: </internal-file></reference><sdl:ref-files><sdl:ref-file uid="0" id="http://www.sdl.com/Sdl.FileTypeSupport.Bilingual.Itd/OriginalFile" name="GUID-05758A9C-015D-4649-97F3-91F9625D70EE-en-us-ja-2-20150509-0400_xml.itd"

    Output: </internal-file></reference><sdl:ref-files><sdl:ref-file uid="0" id="http://www.sdl.com/Sdl.FileTypeSupport.Bilingual.Itd/OriginalFile" name="lrrznyq5.y0u.itd"

    I am not sure if these changes impact the file for processing in TMS.

    Thanks

    Petr

Children