1
C#WinForm應用程序是使用兩個由frmMain擁有的resx文件的frmMain上的雙語言。設置語言不適用於已安裝的應用程序
從註冊表中檢索信息,然後決定使用哪種語言。
適用於IDE,但frmMain在安裝的應用程序中以英文顯示。
正在達到線程文化設置代碼。 FrmMain resx文件出現在安裝目錄中。 安裝在具有管理員權限的開發機器上完成。 任何想法可能會導致這一點,將不勝感激。
public frmMain(string sApplication):base(sApplication)
{
const string french = "SupFrench";
string culture = ClsLang.PrimaryLangIpf;
clsLogger.WriteInfoLog("PrimaryLangIpf is " + culture);
if (culture==french
{
clsLogger.WriteInfoLog("Setting Culture to French");//**WE GET HERE**
System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("fr-FR", false);
System.Threading.Thread.CurrentThread.CurrentCulture =
new System.Globalization.CultureInfo("fr-FR", false);
}
InitializeComponent();