An instance of the MultiString class defines a string with individual strings for each language supported by the site (defined in LanguageSettings.json).
Anywhere a language-specific string could be used, a MultiString object can be used, as it defines strings for all site-supported languages. The MultiString class is also supported by all data providers.
Forms that require input of all language-specific string can use the MultiString component, see UIHint("MultiString"). Otherwise forms can use regular strings, but store data using the MultiString class. Conversion between string and MultiString objects is usually automatic.
Namespace: YetaWF.Core.Models
Assembly: YetaWF.Core
Inheritance
[TypeConverter(typeof(YetaWF.Core.Models.MultiStringConv))] public class MultiString : System.Collections.Generic.Dictionary<string,string>, System.IComparable;
MultiString | Constructor. Makes a copy of an existing MultiString object. |
ActiveLanguage | Returns the currently active language id. Users can change the currently active language using User > Settings (standard YetaWF site). | |
Comparer | Gets the IEqualityComparer<T> that is used to determine equality of keys for the dictionary. | |
Count | Gets the number of key/value pairs contained in the Dictionary<TKey,TValue>. | |
DefaultLanguage | Returns the site-defined default language id. | |
DefaultText | Returns the default text for all language-specific string. The default text is used for languages for which no string has been defined. | |
Item | Defines the language-specific string for a language id. | |
Keys | Gets a collection containing the keys in the Dictionary<TKey,TValue>. | |
LanguageIdList | Returns a list of language ids that are defined in LanguageSettings.json. | |
Languages | Returns a list of languages that are defined in LanguageSettings.json. | |
Values | Gets a collection containing the values in the Dictionary<TKey,TValue>. |
MaxLanguage | Defines the maximum length of a language id. |
Add | Adds a language-specific value to the MultiString instance. This is used internally only. | |
Case | Changes all language-specific strings and the default text to the specified casing. | |
Clear | Removes all keys and values from the Dictionary<TKey,TValue>. | |
CompareTo | (not specified) | |
ContainsKey | Determines whether the Dictionary<TKey,TValue> contains the specified key. | |
ContainsValue | Determines whether the Dictionary<TKey,TValue> contains a specific value. | |
EnsureCapacity | Ensures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage. | |
Equals | Determines whether the specified object is equal to the current object. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. | |
GetEnumerator | Returns an enumerator that iterates through the Dictionary<TKey,TValue>. | |
GetHashCode | Serves as the default hash function. | |
GetObjectData | Implements the ISerializable interface and returns the data needed to serialize the Dictionary<TKey,TValue> instance. | |
GetPrimaryLanguage | Returns the primary language given a language id. | |
GetType | Gets the Type of the current instance. | |
HasLanguageText | Returns whether a language-specific string has been defined. | |
MemberwiseClone | Creates a shallow copy of the current Object. | |
NormalizeLanguageId | Given a language id (which may be invalid or deleted), return a valid language id. | |
OnDeserialization | Implements the ISerializable interface and raises the deserialization event when the deserialization is complete. | |
ReferenceEquals | Determines whether the specified Object instances are the same instance. | |
Remove | Removes the value with the specified key from the Dictionary<TKey,TValue>. | |
ToString | Returns a string for the currently active language. | |
Trim | Trims the specified character from all language-specific strings and the default text. | |
TrimExcess | Sets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries. | |
TryAdd | Attempts to add the specified key and value to the dictionary. | |
TryGetValue | Gets the value associated with the specified key. |
implicit operator | Conversion operator. |
See Also YetaWF.Core Overview
Documentation Feedback
© 2024 - Softel vdm, Inc. - YetaWF.com