Class TranslationUnit
Represents a unit of translation - a unit of text (a word, a phrase, a sentence, etc.) in a translation accessible using a unique key - that does not contain parameters ('format items' in .NET terms) and can be used without further processing.
This class is used in generated code except when using Avalonia, WinUI or UWP (those have own TranslationUnit classes in the corresponding assemblies).
Inherited Members
Namespace: Tlumach
Assembly: Tlumach.dll
Syntax
public class TranslationUnit : BaseTranslationUnit
Constructors
TranslationUnit(TranslationManager, TranslationConfiguration, string)
Declaration
public TranslationUnit(TranslationManager translationManager, TranslationConfiguration translationConfiguration, string key)
Parameters
| Type | Name | Description |
|---|---|---|
| TranslationManager | translationManager | |
| TranslationConfiguration | translationConfiguration | |
| string | key |
Properties
CurrentValue
Declaration
public string CurrentValue { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetValue(CultureInfo)
Returns the value of the translation text for the specified culture/locale.
Declaration
public string GetValue(CultureInfo cultureInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| CultureInfo | cultureInfo | The culture/locale for which the text is needed. |
Returns
| Type | Description |
|---|---|
| string | The requested text or an empty string. |