一、Winform
1、可以通过编写txt文件记录各种不同文化的菜单显示文本,如果有中文 使用utf-8来保存
2、通过resgen来利用已经编写的不同文化的txt文件生成xxx.resources,xxx.zh-CN.resources文件
3、在程序初始化的时候利用ResourceManager读取 并根据配置显示
private void ReadResource()
{
rm=ResourceManager.CreateFileBasedResourceManager("testmorelanguage",".",null);
ci=new CultureInfo("zh-CN");
this.menuItem1.Text=rm.GetString("menu",ci);
this.button1.Text=rm.GetString("button",ci);
this.label1.Text=rm.GetString("lable",ci);
this.Refresh();
}
二、web
1、根据用户Cookie来设置不同文化
2、根据用户的配置文件
3、预生成页(制作一个生成器 使得可以生成不同语言的Site)
4、使用IE版本
5、参数传递,Url重定向