Hide

YetaWF.Core Package Documentation

Display
Print

YetaWF.Core.Models.MultiString Class

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

Syntax

[TypeConverter(typeof(YetaWF.Core.Models.MultiStringConv))]
public class MultiString : System.Collections.Generic.Dictionary<string,string>,
    System.IComparable;

Constructors

PublicMultiStringConstructor. Makes a copy of an existing MultiString object.

Properties

PublicStaticActiveLanguageReturns the currently active language id. Users can change the currently active language using User > Settings (standard YetaWF site).
PublicInherited from System.Collections.Generic.Dictionary<String,String>ComparerGets the IEqualityComparer<T> that is used to determine equality of keys for the dictionary.
PublicInherited from System.Collections.Generic.Dictionary<String,String>CountGets the number of key/value pairs contained in the Dictionary<TKey,TValue>.
PublicStaticDefaultLanguageReturns the site-defined default language id.
PublicDefaultTextReturns the default text for all language-specific string. The default text is used for languages for which no string has been defined.
PublicItemDefines the language-specific string for a language id.
PublicInherited from System.Collections.Generic.Dictionary<String,String>KeysGets a collection containing the keys in the Dictionary<TKey,TValue>.
PublicStaticLanguageIdListReturns a list of language ids that are defined in LanguageSettings.json.
PublicStaticLanguagesReturns a list of languages that are defined in LanguageSettings.json.
PublicInherited from System.Collections.Generic.Dictionary<String,String>ValuesGets a collection containing the values in the Dictionary<TKey,TValue>.

Fields

PublicStaticMaxLanguageDefines the maximum length of a language id.

Methods

PublicAddAdds a language-specific value to the MultiString instance. This is used internally only.
PublicCaseChanges all language-specific strings and the default text to the specified casing.
PublicInherited from System.Collections.Generic.Dictionary<String,String>ClearRemoves all keys and values from the Dictionary<TKey,TValue>.
PublicCompareTo(not specified)
PublicInherited from System.Collections.Generic.Dictionary<String,String>ContainsKeyDetermines whether the Dictionary<TKey,TValue> contains the specified key.
PublicInherited from System.Collections.Generic.Dictionary<String,String>ContainsValueDetermines whether the Dictionary<TKey,TValue> contains a specific value.
PublicInherited from System.Collections.Generic.Dictionary<String,String>EnsureCapacityEnsures that the dictionary can hold up to a specified number of entries without any further expansion of its backing storage.
PublicInherited from System.ObjectEqualsDetermines whether the specified object is equal to the current object.
ProtectedInherited from System.ObjectFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
PublicInherited from System.Collections.Generic.Dictionary<String,String>GetEnumeratorReturns an enumerator that iterates through the Dictionary<TKey,TValue>.
PublicGetHashCodeServes as the default hash function.
PublicInherited from System.Collections.Generic.Dictionary<String,String>GetObjectDataImplements the ISerializable interface and returns the data needed to serialize the Dictionary<TKey,TValue> instance.
PublicStaticGetPrimaryLanguageReturns the primary language given a language id.
PublicInherited from System.ObjectGetTypeGets the Type of the current instance.
PublicHasLanguageTextReturns whether a language-specific string has been defined.
ProtectedInherited from System.ObjectMemberwiseCloneCreates a shallow copy of the current Object.
PublicStaticNormalizeLanguageIdGiven a language id (which may be invalid or deleted), return a valid language id.
PublicInherited from System.Collections.Generic.Dictionary<String,String>OnDeserializationImplements the ISerializable interface and raises the deserialization event when the deserialization is complete.
PublicStaticInherited from System.ObjectReferenceEqualsDetermines whether the specified Object instances are the same instance.
PublicInherited from System.Collections.Generic.Dictionary<String,String>RemoveRemoves the value with the specified key from the Dictionary<TKey,TValue>.
PublicToStringReturns a string for the currently active language.
PublicTrimTrims the specified character from all language-specific strings and the default text.
PublicInherited from System.Collections.Generic.Dictionary<String,String>TrimExcessSets the capacity of this dictionary to what it would be if it had been originally initialized with all its entries.
PublicInherited from System.Collections.Generic.Dictionary<String,String>TryAddAttempts to add the specified key and value to the dictionary.
PublicInherited from System.Collections.Generic.Dictionary<String,String>TryGetValueGets the value associated with the specified key.

Operators

PublicStaticimplicit operatorConversion operator.

See Also YetaWF.Core Overview