public void OnAfterDeserialize() { if (serializedKeys == null) { return; } languageDataHandler.LoadedValuesDictionary = new SortedDictionary <string, LocalizedObject>(); for (int i = 0; i < serializedKeys.Count; ++i) { languageDataHandler.LoadedValuesDictionary.Add(serializedKeys[i], serializedValues[i]); } languageDataHandler.LoadedCulture = serializedCulture; serializedKeys.Clear(); serializedValues.Clear(); serializedCulture = null; }
/// <summary> /// Change the language into a specified culture /// </summary> /// <param name="cultureInfo">The culture to change to</param> public void ChangeLanguage(SmartCultureInfo cultureInfo) { ChangeLanguage(cultureInfo.languageCode); }
/// <summary> /// Checks if a culture is supported by this application /// </summary> /// <param name="cultureInfo">The culture info to check</param> /// <returns>If the culture is supported</returns> public bool IsCultureSupported(SmartCultureInfo cultureInfo) { return(IsCultureSupported(cultureInfo.languageCode)); }
/// <summary> /// Checks if a specific culture info is in this collection /// </summary> /// <param name="cultureInfo">The culture info to check</param> /// <returns>If the specified culture info was in the collection</returns> public bool IsCultureInCollection(SmartCultureInfo cultureInfo) { return(FindCulture(cultureInfo) != null); }