public TextTranslatorGoogle(enmLanguage languageFrom, enmLanguage languageTo) { throw new NotImplementedException(); /*LanguageFrom = languageFrom; * LanguageTo = languageTo; * Client = new TranslateService(new BaseClientService.Initializer() * { * ApiKey = "My API Key", * ApplicationName = "Under The Cursor Translator" * });*/ }
public static void Init(enmLanguage lang = enmLanguage.en, bool DumpToFile = false) { try { Text1 = LoadDatabaseFile(lang.ToString(), 0, DumpToFile); Text2 = LoadDatabaseFile(lang.ToString(), 1, DumpToFile); Text3 = LoadDatabaseFile(lang.ToString(), 2, DumpToFile); BinaryDatabase = new BinaryDB(); BinaryDatabase.Init(); } catch (Exception e) { Console.WriteLine(e); throw new InvalidDataException("Could not load one or more database files, check the data folder!"); } InitLists(DumpToFile); if (DumpToFile) { BinaryDatabase.DumpToJson(); } }
public void SetLanguageTo(enmLanguage language) { LanguageTo = language; }
public TextTranslatorGoogleUnofficial(enmLanguage languageTo) { LanguageTo = languageTo; }