Class TranslatedStringDictionary
A custom dictionary type to distinguish language specific class properties.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public class TranslatedStringDictionary : Dictionary<string, string>, IDictionary<string, string>, ICollection<KeyValuePair<string, string>>, IReadOnlyDictionary<string, string>, IReadOnlyCollection<KeyValuePair<string, string>>, IEnumerable<KeyValuePair<string, string>>, IDictionary, ICollection, IEnumerable, IDeserializationCallback, ISerializable
Constructors
TranslatedStringDictionary()
Declaration
public TranslatedStringDictionary()
TranslatedStringDictionary(IDictionary<string, string>)
Declaration
public TranslatedStringDictionary(IDictionary<string, string> dictionary)
Parameters
IDictionary<string, string> dictionary |
TranslatedStringDictionary(int)
Methods
FromJson(string)
Declaration
public static TranslatedStringDictionary FromJson(string data)
Parameters
string data |
Returns
GetTranslation(string)
Get a translation; fallback to x-default if specified language does not exist.
Declaration
public string GetTranslation(string twoLetterIsoLanguageName = null)
Parameters
string
twoLetterIsoLanguageName
The language to retrieve; fallback to CultureInfo.CurrentCulture.TwoLetterISOLanguageName if not specified. |
Returns
string
The translated string. |