MultilanguageString Class

Represents a multi-lingual string that stores a text in multiple languages.
Public Class MultilanguageString 
Implements INotifyPropertyChanged
This language is not supported or no code example is available.
public class MultilanguageString : INotifyPropertyChanged
This language is not supported or no code example is available.
Name Description
Public constructor MultilanguageString(string) Initializes a new instance of the MultilanguageString class from a raw string.
Top
Name Description
Public property Languages Gets all languages, including the native (neutral) one, stored in this string.
Public property RawString Gets or sets the multi-language raw string representation of this string. It holds the complete data, so it can be used to clone multi-language strings.
Top
Methods
 
Name Description
Public method Clear() Removes the text in all locales and sets the native (neutral) text to an empty string.
Public method Concat(MultilanguageString) Concatenates two multi-language strings and returns the result. The concatenation is done for each language separately. The original strings are not modified.
Public method Concat(string) Concatenates this multi-language string with a standard string and returns the result. The concatenation is done for each language separately. The current multi-language string is not modified.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Public method GetText(string) Gets a text in the specified language.
Public method GetType Gets the Type of the current instance. (inherited from Object).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Protected method OnPropertyChanged(string) Raises the PropertyChanged event.
Public method SetText(string, string) Sets a text in the specified language.
Public method ToString Returns a string that represents the current object. (inherited from Object).
Top
Events
 
Name Description
Public event PropertyChanged Occurs when a property value has changed. Used with the RawString property.
Top
Remarks
 
There are many places in QDV where a multi-language text may be entered. For example, Field name in the Field manager. The text is stored for multiple locales and a user normally sees only the version for the current estimate locale.

This class provides functionality for handling such multi-language strings. When the user API supports multilingual strings, it uses a so called "raw" string that contains all available translations and optionally also a "native" (neutral) text. Methods in this class help to manipulate with this raw string.

The format of a raw string is as follows:

[optional_native_text]{LOCALE_ID1}localized_text1{LOCALE_ID2}localized_text2...

Where LOCALE_ID is a standard locale identifier, such as "En-us" or a short form "En".

This class provides also the PropertyChanged event which notifies a user when the RawString property has changed.

Qdv.UserApi.MultilanguageString
Version
 
Available since QDV 7.16.585.

.NET Framework

Supported in: 4.8, 4.7, 4.6, 4.5.2

In this article

Definition