惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - LeeWenjie

【转发】NPAPI学习(Firefox和Chrome扩展开发 ) 【转发】NPAPI开发详解,Windows版 【转发】网易邮箱前端技术分享之javascript编码规范 【转发】揭秘Facebook 的系统架构 【转发】淘宝网架构分享总结 【转发】淘宝网采用什么技术架构来实现网站高负载的 【转发】浅析淘宝网首页信息架构的变迁 【转发】Html5 File Upload with Progress 【转载】使用JavaScript实现Motion Detection 【转发】WEB前端开发规范文档 【转发】响应式Web设计?怎样进行? 【转发】开源中最好的Web开发的资源 【原创】PDA DataGrid的滚动条事件处理 【原创】PDA 实现DataGrid可编辑 【转发】SharePoint 2010——ListData.svc故障排除 【转发】谈论 SharePoint 2010中的沙盒解决方案(Sandboxed Solution) 【原创】NET4.0在SharePoint 2010 IIS下出现导演 【转载】互联网产品开发中的“快”字诀 【转载】SHAREPOINT TimeJob定时器开发
C#实现多语言
LeeWenjie · 2011-12-13 · via 博客园 - LeeWenjie

1、要在项目稳定以后,再做多语言本地化。

2、做语言主要注意一下几点

2.1控件(包括窗体)的多语言支持,可以在vs2008的命令提示中输入winres。采用可视化的操作界面进行设置

窗体需要设置LocalLizable = true

并选择Language

2.2变量多语言:

(1)代码中一定不要使用硬编码。

(2)使用此编码方式:string msg = Properties.Resources.InfoMsg。InfoMsg是通过Resources.resx设置。

    因此所有的需要多语言处理的都要用变量的方式在Resources.resx进行设置

(3)在程序完成后,复制Resources.resx文件。将其命名为Resources.en-GB.resx。

3、在程序出口处,加入以下语句

            System.Globalization.CultureInfo UICulture = new System.Globalization.CultureInfo("en-GB");

            Thread.CurrentThread.CurrentUICulture = UICulture;

通过以上步骤即可完成程序多语言

注意:多语言处理后,程序bin目录下就会出现相应的多语言的文件夹