Storing source file as base64 in SDLXLIFF

Hi,

I have written a custom bilingual file type based on the SDK, but did not find a method to write the original source file into the generated SDLXLIFF file. The problem is that when generating the target translation, I can use only the IPersistentFileConversionProperties.OriginalFilePath property to access the original file, and generate the target translation based on that. However, if the studio project has been moved into another directory in the meantime, then I cannot generate the target translation, because the original source file cannot be found at the original location anymore.

For SDLXLIFF files generated with built-in file types I see that the original file content is also written into the SDLXLIFF. So that can be used to generate the target translation even if the original file is not accessible anymore:

<file ...>

  <header>

    <reference>

      <internal-file form="base64">BASE64ENCODEDFILECONTENT</ ...>...

But this is not done in case of my custom file type, and I have not found how to achieve this. Is there a solution for this? Either storing/reading the original content, or accessing the source file in at the new location? What is the best way of doing this?

Thanks in advance,

Tamas

Parents Reply Children
No Data