/// <summary> /// Creates a new instance of the TranslationEngine class. /// </summary> /// <param name="TranslationCollection">Translation to use.</param> public TranslationEngine(TranslationCollection TranslationCollection) { Translations = TranslationCollection; }
/// <summary> /// Creates a new instance of the TranslationEngine class with /// the specified target control. /// </summary> /// <param name="TranslationCollection">Translations to use.</param> /// <param name="Target"></param> public TranslationEngine(TranslationCollection TranslationCollection, Control Target) { Translations = TranslationCollection; parentControl = Target; }
/// <summary> /// Reloads the translation file. /// </summary> public void ReloadTranslation() { LanguageFile langFile; try { string filename = TranslationFileName; langFile = new LanguageFile(filename); Translations = langFile.ParseTranslations(); } catch (Exception ex) { throw new TranslationLoadException(ex); } }