Class UntranslatedUnit
This class can be used to present some application-provided string in situations where a TranslationUnit is required.
public class UntranslatedUnit : TranslationUnit, IDisposable
- Inheritance
-
UntranslatedUnit
- Implements
- Inherited Members
Constructors
UntranslatedUnit(string, TranslationManager, TranslationConfiguration, bool)
Initializes a new instance of the UntranslatedUnit class.
public UntranslatedUnit(string sourceValue, TranslationManager translationManager, TranslationConfiguration translationConfiguration, bool containsPlaceholders)
Parameters
sourceValuestringThe string value to return.
translationManagerTranslationManagerA reference to some instance of TranslationManager. It can be any instance - it is not used by the class.
translationConfigurationTranslationConfigurationA reference to an instance of TranslationConfiguration. If
containsPlaceholdersis true, this configuration's TextProcessingMode is used to process thesourceValue.containsPlaceholdersboolSpecifies whether
sourceValuecontains placeholders and should be processed accordingly.
Properties
SourceValue
Gets or sets the string value that this translation unit exposes.
public string? SourceValue { get; set; }
Property Value
Methods
InternalGetEntry(CultureInfo)
Returns an entry with the text of SourceValue, whatever the culture.
protected override TranslationEntry? InternalGetEntry(CultureInfo cultureInfo)
Parameters
cultureInfoCultureInfoThe culture. It is not used.
Returns
- TranslationEntry
An entry whose text is SourceValue.
InternalGetEntry(string[])
Returns an entry with the text of SourceValue, whatever the languages.
protected override TranslationEntry? InternalGetEntry(string[] langIDs)
Parameters
langIDsstring[]The language IDs. They are not used.
Returns
- TranslationEntry
An entry whose text is SourceValue.
InternalGetValueAsText(CultureInfo)
Returns SourceValue, whatever the culture.
protected override string InternalGetValueAsText(CultureInfo culture)
Parameters
cultureCultureInfoThe culture. It is not used.
Returns
- string
The value of SourceValue.
InternalGetValueAsText(string[])
Returns SourceValue, whatever the languages.
protected override string InternalGetValueAsText(string[] langIDs)
Parameters
langIDsstring[]The language IDs. They are not used.
Returns
- string
The value of SourceValue.