Table of Contents

Class Translation

Namespace
Loehnert.Lisrt.Localization
Assembly
Loehnert.Lisrt.dll

Represents a translation, not working with resources.

public class Translation : ITranslation, INotifyPropertyChanged
Inheritance
Translation
Implements
ITranslation
Inherited Members

Constructors

Translation(IDictionary<string, string>)

Initializes a new instance of the Translation class.

public Translation(IDictionary<string, string> translations)

Parameters

translations IDictionary<string, string>

Properties

ErrorHandling

Gets the error handling used by this translation.

public ErrorHandling ErrorHandling { get; }

Property Value

ErrorHandling

Key

Gets the key, is always empty.

public string Key { get; }

Property Value

string

Translated

Gets the translated text. This value updates when Gu.Localization.Translator.CurrentCulture changes.

public string Translated { get; }

Property Value

string

Methods

Translate(CultureInfo, ErrorHandling)

Translates this translation to the specified culture.

public string Translate(CultureInfo culture, ErrorHandling errorHandlingStrategy = ErrorHandling.Inherit)

Parameters

culture CultureInfo

The culture.

errorHandlingStrategy ErrorHandling

Specifies how errors are handled.

Returns

string

The translated string.

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler