Class XlfTransUnit
- Namespace
- SunamoXliffParser
- Assembly
- SunamoXliffParser.dll
Represents a translation unit (trans-unit) element in an XLIFF document.
public class XlfTransUnit
- Inheritance
-
XlfTransUnit
- Inherited Members
- Extension Methods
Constructors
XlfTransUnit(XElement, XNamespace)
Initializes a new instance of the XlfTransUnit class from an existing XML element.
public XlfTransUnit(XElement node, XNamespace xmlNamespace)
Parameters
nodeXElementThe XML element representing the translation unit.
xmlNamespaceXNamespaceThe XML namespace of the XLIFF document.
XlfTransUnit(XElement, XNamespace, string, string, string)
Initializes a new instance of the XlfTransUnit class with specified values.
public XlfTransUnit(XElement node, XNamespace xmlNamespace, string id, string source, string target)
Parameters
nodeXElementThe XML element representing the translation unit.
xmlNamespaceXNamespaceThe XML namespace of the XLIFF document.
idstringThe identifier of the translation unit.
sourcestringThe source text.
targetstringThe target text.
Fields
ResxPrefix
The prefix used for resource identifiers in the Multilingual App Toolkit dialect.
public const string ResxPrefix = "Resx/"
Field Value
Properties
Id
Gets the identifier of this translation unit.
public string Id { get; }
Property Value
Optional
Gets the optional attributes of this translation unit.
public XlfTransUnit.Optionals Optional { get; }
Property Value
Source
Gets or sets the source text of this translation unit.
public string Source { get; set; }
Property Value
Target
Gets or sets the value of the target element. May be null if the element does not exist. Allowed are zero or one target elements.
public string? Target { get; set; }
Property Value
Methods
GetId(XlfDialect)
Gets the effective identifier for this translation unit based on the specified dialect.
public string GetId(XlfDialect dialect)
Parameters
dialectXlfDialectThe XLIFF dialect to use for identifier resolution.
Returns
- string
The resolved identifier string.