/// <summary> /// Localizes the application. /// </summary> private void LocalizeApp(string langDir) { if (!Locale.LoadDictionaries(langDir, "ScadaCommon", out string errMsg)) { log.WriteError(errMsg); } if (!Locale.LoadDictionaries(langDir, "ScadaServer", out errMsg)) { log.WriteError(errMsg); } CommonPhrases.Init(); ServerPhrases.Init(); }
/// <summary> /// Localizes the application. /// </summary> private bool LocalizeApp() { if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaCommon", out string errMsg)) { log.WriteError(errMsg); } if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaServer", out errMsg)) { log.WriteError(errMsg); } CommonPhrases.Init(); ServerPhrases.Init(); return(true); }
/// <summary> /// Localizes the application. /// </summary> private void LocalizeApp() { // load instance culture if (!Locale.LoadCulture(GetInstanceConfigFileName(), out string errMsg)) { ErrLog.WriteError(errMsg); } // load dictionaries if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaCommon", out errMsg)) { ErrLog.WriteError(errMsg); } if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaAdmin", out errMsg)) { ErrLog.WriteError(errMsg); } if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaServer", out errMsg)) { ErrLog.WriteError(errMsg); } if (!Locale.LoadDictionaries(AppDirs.LangDir, "ScadaComm", out errMsg)) { ErrLog.WriteError(errMsg); } // read phrases from the dictionaries CommonPhrases.Init(); AdminPhrases.Init(); AppPhrases.Init(); ServerPhrases.Init(); CommPhrases.Init(); }