visual-studio app.config 全球化

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1265556/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:51:46  来源:igfitidea点击:

app.config globalization

.netvisual-studioglobalizationapplication-settings

提问by thomas nn

web.config allow a globalization tag: This setting will set the globalization for the entire ASP.NET application.

web.config 允许全球化标记:此设置将为整个 ASP.NET 应用程序设置全球化。

Does this tag work in app.config in standard forms applications too? If yes... where shall it be placed?

这个标签也适用于标准表单应用程序的 app.config 吗?如果是的话……应该放在哪里?



Or.. is there another way to set the globalization for the entire forms application. Including dll's and all threads?

或者.. 是否有另一种方法来为整个表单应用程序设置全球化。包括dll和所有线程?

回答by Wael Dalloul

take a look at the following topic: How to: Set the Culture and UI Culture for Windows Forms Globalization

请查看以下主题: 如何:为 Windows 窗体全球化设置文化和 UI 文化

To set the Culture to the Main Application use the following snippet code:

要将文化设置为主应用程序,请使用以下代码段:

Dim newCulture As CultureInfo = new CultureInfo("fr-FR")
CurrentThread.CurrentCulture = newCulture