添加资源文件
ResourceManager rm = new ResourceManager("winResource.Resource1", Assembly.GetExecutingAssembly());
CultureInfo ci = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-CN");
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-us");
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ja-JP");
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");
}
}