Skip to main content

MultiLanguageText

The MultiLanguageText class manages text in multiple languages, allowing for culture-specific text retrieval and modification. It inherits from Dictionary.

Properties

NameDescription
EnableMultiLanguageTextIndicates whether multi-language text support is enabled.
DefaultCultureThe default culture code used when no specific culture text is available.
UserCultureThe culture code representing the user's preferred language.

Constructors

NameDescription
MultiLanguageText()Initializes a new instance of the MultiLanguageText class with default values.
MultiLanguageText(dictionary)Initializes a new instance of the MultiLanguageText class with the specified dictionary of language texts.

Methods

NameDescription
SetValueAsObject(value)Sets the text values from a dictionary of culture-text pairs.
SetUserCulture(culture)Sets the user culture for text retrieval.
SetDefaultCulture(culture)Sets the default culture for text retrieval.
SetText(text, culture)Sets the text for the specified culture.
SetEnabledMultiLanguageText(enableMultiLanguageText)Enables or disables multi-language text support.
GetData()Retrieves the dictionary of culture-text pairs.
RemoveAll()Removes all texts for all cultures.
RemoveText(culture)Removes the text for the specified culture.
GetText(culture)Retrieves the text for the specified culture or the best available culture.

Events

NameDescription
MultiLanguageTextChangingOccurs when the multi-language text is about to change.
TextChangingOccurs when the text is about to change.
TextChangedOccurs after the text has changed.
MultiLanguageTextChangedOccurs after the multi-language text has changed.