Click or drag to resize

MultilanguageString Class

Represents immutable store for multiple strings, one per language
Inheritance Hierarchy
SystemObject
  Aloe.EnterpriseOne.ModelMultilanguageString

Namespace:  Aloe.EnterpriseOne.Model
Assembly:  Aloe.EnterpriseOne.Model (in Aloe.EnterpriseOne.Model.dll) Version: 20.1.3.5
Syntax
public class MultilanguageString : IEquatable<MultilanguageString>, 
	IComparable<MultilanguageString>, IComparable, IFormattable

The MultilanguageString type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyAnyString
Gets any language string, that has a value. The method checks the current string first, but if it is empty, returns any string.
Public propertyContents
Gets a string representation of all language strings in the form <key>='<value>' for each language pair.
Public propertyStatic memberCurrentLanguage
Gets the two letter code of the current thread language.
Public propertyCurrentString
Gets the string for the language of the current UI culture.
Public propertyItem
Gets the language String with the specified language key.
Public propertyLanguagePairs
Gets all the language keys and values, comprising the MultilanguageString.
Top
Methods
  NameDescription
Public methodCompareTo(Object)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodCompareTo(MultilanguageString)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Public methodStatic memberConcat(String, MultilanguageString)
Concatenates a MultilanguageString and a normal string, by concatenating each language string with the normal string.
Public methodStatic memberConcat(MultilanguageString, MultilanguageString)
Concatenates the specified MultilanguageString instances.
Public methodStatic memberConcat(MultilanguageString, String)
Concatenates a MultilanguageString and a normal string, by concatenating each language string with the normal string.
Public methodContainsLanguageString
Determines whether the MultilanguageString contains language string with the specified key.
Public methodStatic memberCreateFromContents
Creates a new MultilanguageString from a string, containing contents. For more information, see Contents.
Public methodStatic memberCreateFromCurrentLanguageString
Creates a new MultilanguageString from current language string.
Public methodStatic memberCreateFromLanguagePairs
Creates a new MultilanguageString from language pairs.
Public methodStatic memberCreateFromStringLanguagePairs
Creates a new MultilanguageString from language key - value string pairs.
Public methodStatic memberCreteFromPatchString
Creates a new MultilanguageString from previous patch string and previous value, respecting format.
Public methodEquals(Object)
Determines whether the specified Object, is equal to this instance.
(Overrides ObjectEquals(Object).)
Public methodEquals(MultilanguageString)
Indicates whether the current object is equal to another object of the same type.
Public methodStatic memberFormat
Returns a new MultilanguageString with each language string formatted according to format and arguments.
Public methodStatic memberFormatIntersect
Returns a new MultilanguageString containing language strings formatted according to format and argument. The result contains only languages, which occur in both the format and the argument.
Public methodGetHashCode
Returns a hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetLanguageString
Returns the string for the specified language or null if it is not found.
Public methodStatic memberIsNullOrEmpty
Determines whether the specified string is null or empty.
Public methodStatic memberJoin
Concatenates all the elements of a string array, using the specified separator between each element.
Public methodRemoveLanguageString
Returns a new MultilanguageString without the language string with the specified key.
Public methodReplaceLanguageString
Returns new MultilanguageString with the specified language string replaced.
Public methodToString
Returns a String that represents this instance.
(Overrides ObjectToString.)
Public methodToString(String)
Returns a String that represents this instance.
Public methodToString(String, IFormatProvider)
Returns a String that represents this instance.
Public methodStatic memberValidateAndFormatLanguageKey
Validates the and formats the specified language key.
Top
Operators
  NameDescription
Public operatorStatic memberAddition(String, MultilanguageString)
Implements the operator +.
Public operatorStatic memberAddition(MultilanguageString, MultilanguageString)
Implements the operator +.
Public operatorStatic memberAddition(MultilanguageString, String)
Implements the operator +.
Public operatorStatic memberEquality
Implements the operator ==.
Public operatorStatic member(String to MultilanguageString)
Performs an explicit conversion from String to MultilanguageString.
Public operatorStatic member(MultilanguageString to String)
Performs an explicit conversion from MultilanguageString to String. It gets only the current language string.
Public operatorStatic memberInequality
Implements the operator !=.
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
Gets the empty MultilanguageString.
Top
Extension Methods
  NameDescription
Public Extension MethodContains
Returns a value indicating whether a specified substring occurs within this MultilanguageString.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetCurrentLanguageStringOrDefault
Gets the current language string. When from is null or there is no string for the current language, returns the language string of the default language.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetCurrentOrAny(String)Overloaded.
Gets current language string. If not available - the second preference. If also not available - any.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetCurrentOrAny(String, String)Overloaded.
Gets current language string. If not available - the second preference. If also not available - any.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetCurrentOrTransliterated
Gets the current language string or transliterates another language string to the current language.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetLanguageStringOrAny
Gets specified language string. If not available - any.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodGetLanguageStringOrDefault
Returns the string for the specified language. If the MultilanguageString instance is null or the language string is not found, a null is returned.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodLike
Compares a string against pattern.
(Defined by MultilanguageStringExtensions.)
Public Extension MethodNormalize
Removes empty strings.
(Defined by MultilanguageStringExtensions.)
Top
Remarks
The multi-language string can store many language strings, indexing them by language key. The language key is a CultureInfo two letter ISO language name, like "en", "de", etc. The multi-language string can be encoded or decoded to/from normal string, which is particularly useful for serialization and persistence.
See Also