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
UserCultureThe culture code representing the user's preferred language.
DefaultCultureThe default culture code used when no specific culture text is available.
EnableMultiLanguageTextIndicates whether multi-language text support is enabled.

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

Events

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