Table of Contents

Class XliffWriter

Namespace
Tlumach.Writers
Assembly
Tlumach.Writers.dll

A writer for XLIFF 2.2 (eXtensible Localization Interchange File Format). XLIFF is a bitext format that combines source and target translations in a single file.

public class XliffWriter : BaseXmlWriter
Inheritance
XliffWriter
Inherited Members

Properties

ConfigExtension

public override string ConfigExtension { get; }

Property Value

string

FormatName

public override string FormatName { get; }

Property Value

string

SegmentSeparator

Gets or sets the string that separates individual segments within a single translation value. When writing, a value containing this separator is split into multiple XLIFF <segment> elements. Defaults to a tab character, matching SegmentSeparator.

public string SegmentSeparator { get; set; }

Property Value

string

SourceFile

Gets or sets the source filename to use in the XLIFF file. If not set, defaults to the source translation's OriginalFilename or the configuration's DefaultFile.

public string? SourceFile { get; set; }

Property Value

string

TargetFile

Gets or sets the target filename (used for reference/metadata only).

public string? TargetFile { get; set; }

Property Value

string

TranslationExtension

public override string TranslationExtension { get; }

Property Value

string

Methods

InternalWriteXmlTranslations(Translation, Stream)

protected override void InternalWriteXmlTranslations(Translation translation, Stream stream)

Parameters

translation Translation
stream Stream

WriteTranslations(TranslationManager, IReadOnlyCollection<CultureInfo>, Stream)

Writes translations in the format that supports multiple languages in one file.

public override void WriteTranslations(TranslationManager translationManager, IReadOnlyCollection<CultureInfo> cultures, Stream stream)

Parameters

translationManager TranslationManager

The translation translationManager from which the translations should be picked.

cultures IReadOnlyCollection<CultureInfo>

The list of cultures to write.

stream Stream

The stream to write the resulting file to.