通过资源文件实现或XML实现 配置资源文件如:Resource1.zh-CN.resx,Resource1.zh-TW.resx,Resource1.en-US.resx。 public static void SetLang(string lang, Form form, Type formType) { System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang); if (form != null) { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(formType); resources.ApplyResources(form, "$this");
配置资源文件如:Resource1.zh-CN.resx,Resource1.zh-TW.resx,Resource1.en-US.resx。
public static void SetLang(string lang, Form form, Type formType)
{
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);
if (form != null)
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(formType);
resources.ApplyResources(form, "$this");
}
写好各个语言的界面用词
然后根据选好的语言做替换
或者说load