Class XliffWriter
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
FormatName
public override string FormatName { get; }
Property Value
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
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
TargetFile
Gets or sets the target filename (used for reference/metadata only).
public string? TargetFile { get; set; }
Property Value
TranslationExtension
public override string TranslationExtension { get; }
Property Value
Methods
InternalWriteXmlTranslations(Translation, Stream)
protected override void InternalWriteXmlTranslations(Translation translation, Stream stream)
Parameters
translationTranslationstreamStream
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
translationManagerTranslationManagerThe translation translationManager from which the translations should be picked.
culturesIReadOnlyCollection<CultureInfo>The list of cultures to write.
streamStreamThe stream to write the resulting file to.