MultiLanguageText
The MultiLanguageText
class manages text in multiple languages, allowing for culture-specific text retrieval and modification. It inherits from Dictionary.
Properties
Name | Description |
---|---|
EnableMultiLanguageText | Indicates whether multi-language text support is enabled. |
DefaultCulture | The default culture code used when no specific culture text is available. |
UserCulture | The culture code representing the user's preferred language. |
Constructors
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
MultiLanguageTextChanging | Occurs when the multi-language text is about to change. |
TextChanging | Occurs when the text is about to change. |
TextChanged | Occurs after the text has changed. |
MultiLanguageTextChanged | Occurs after the multi-language text has changed. |