/// <summary> /// Dispose of the object (removes Listener) /// </summary> /// <param name="disposing"></param> protected virtual void Dispose(bool disposing) { if (disposing) { LanguageChangedEventManager.RemoveListener(null, this); } }
/// <summary> /// Initializes a TranslationData-Object /// </summary> /// <param name="key"></param> /// <param name="channel"></param> /// <param name="language"></param> public TranslationData(string key, string channel, string language) { _key = key; this.channel = channel; if (language != null) { try { this.language = new CultureInfo(language); } catch { this.language = TranslationManager.DefaultCulture; } } LanguageChangedEventManager.AddListener(null, this); }