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