C#WinForm应用程序是frmMain上的双重语言,它使用frmMain拥有的两个resx文件。
从注册表中检索信息,然后决定使用哪种语言。
在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();
您不需要FrmMain resx文件位于安装文件夹中,而需要包含* .resources.dll文件的fr-FR子文件夹。
另请参阅:创建资源文件的本地化版本
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句