- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
问候,
我想知道为什么 C# 中没有针对文化的预设枚举?由于文化永远不会改变,而且总是像“nl-NL、en-GB、en-US”。为什么不为它做一个枚举,让事情变得简单一点呢?
[编辑]
如前所述,文化确实会发生变化……但并非全部。为什么不制作一个包含所有文化并提供添加/更改它们的可能性的枚举/类类型?
最佳答案
"Since the cultures never change"
不是吗? This article (Microsoft .NET Framework 4: What is New in Globalization)不同意。仅在过去 5 年里,塞尔维亚地区就发生了很多变化,催生了新的文化。
In the real world, the globalization information is constantly changing because of cultural developments in the local markets, because of new standards which update the culture sensitive information frequently, or because Microsoft finds more accurate information about different markets or expands into more markets.
Microsoft .NET Framework 4 supports a minimum of 354 cultures compared to a minimum of 203 cultures in the previous release. Many of those cultures are neutrals that were added to complete the parent chain to the root neutral culture.
For example, three Inuktitut neutrals were added to the already existing cultures Inuktitut (Syllabics, Canada) and Inuktitut (Latin, Canada)
此外,我猜枚举本身没有意义。 CultureInfo 不仅仅是一个名称,查找提供了更大的灵 active 和独立性,不受任何政治变化的影响,其中的变化比我们通常意识到的要多得多。
关于c# - 为什么没有文化枚举?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5726905/
如何指定输入字符串的哪一部分是日期和月份? 如果输入是 01/10/2017 ,这可以读作 2017 年 10 月 1 日 和 2017 年 1 月 10 日 .两者都是正确的。 我想明确指出 01是
我的 silverlight 应用程序的数据网格中有一个日期列。我需要以 24 小时格式显示时间。为了实现这一点,我修改了 Application_Startup 事件中的 UI 区域性,如下所示:
对于 CultureInfo,调用 DateTimeFormat.AbbreviatedMonthNames 会返回一个数组,其中每个月都以 . 结束,例如 ['jan .',... 'dis.'].
最近,DevOps的采用导致了企业计算的重大转变。除无服务器计算,动态配置和即付即用成本模型之类的功能外,DevOps的实践对于组织可以发挥一些增值效益,例如提高敏捷性,速度和降低成本,也非常有用。
我一直在努力改变 numbro 的文化。我尝试了简单的方法,但出现错误: Unknown culture : ' + code numbro.culture('fr-FR'); 我尝试过这样的: co
有一个 mvc web 应用程序,CSS 在样式表中编码,将在 View 中使用。 有什么办法可以实现下面的场景: When there is a change of language culture
我的 .NET 4.0 项目中嵌入了字符串资源:Strings.resx 和 Strings.de.resx。 在生产代码中,根据 Strings.Culture 的值检索正确的本地化字符串: Str
如何本地化除今天以外的星期几? 以下内容适用于当天: DateTime.Now.ToString("dddd", new CultureInfo("it-IT")); 但是我怎样才能本地化一周中的所有
你好,我想看看是否有更好的方法将字符串解析为涵盖各种格式的 Decimal 1.30 美元 1.50 英镑 2,50 欧元 2,50 € 2.500,00 € 我看到很多用culture来转换. &
你好,我想看看是否有更好的方法将字符串解析为涵盖各种格式的 Decimal 1.30 美元 1.50 英镑 2,50 欧元 2,50 € 2.500,00 € 我看到很多用culture来转换. &
我的应用程序的每个用户都会选择他们的国家/地区,然后将其存储在 cookie 中并存储以供以后请求。一切正常,但我需要在 session 开始时设置文化。我目前正在尝试将 web.config 中的区
我有一个 CLR .NET dll 和 SQL 服务器。系统本地设置(Region/administrative/locallanaguagesettings)从 en-IN 更改为 en-US。但是
你好, 我正在使用 Windows XP sp2 作为我的开发平台, 我在显示 时遇到问题货币符号 . 你看,对于马来西亚来说,正确的货币符号是 RM , 但是当我使用 uiCulture="ms"c
我用 C# 编写了一个报告渲染器,它运行报告并将报告附加到电子邮件中。这一切都很好,除了在报告标题中列出的参数的日期格式不正确。所有报告的语言都设置为 =User!Language 并且使用 Form
这应该很简单,但我似乎找不到这个问题的答案...... 我正在使用 Visual Studio 2008 开发 C# 应用程序,该应用程序支持多种不同的语言。在开发机器上测试不同的语言很简单(例如临时
我正在尝试运行这条确切的线,但它不工作。有谁知道原因吗? Convert.ToBoolean("verdadero", new System.Globalization.CultureInfo("ES
我对数据库编程不是很熟悉,但我有一个Mysql数据库,我在C#下使用Dblinq访问它。现在,当我输入日期、数字等时,使用英语符号,但我的客户需要德语。如何将我的数据库从英语切换为德语? (数据库仍然
我正在尝试使用以下方法更改内置的 .Net 区域性 fr-CA: CultureAndRegionInfoBuilder cib = new CultureAndRegionInfoBuild
我的 orderby linq 表达式有问题。它以错误的顺序生成输出。我来自丹麦并创建了一个丹麦语网站,因此订单必须准确无误。 这是我的查询: var model = (from w in db.Ne
是否可以即时更改 WinRT 中的 UI 文化?我找到了 ApplicationLanguages.PrimaryLanguageOverride = "en"; ,但这仅在显示应用程序 UI 之前有
我是一名优秀的程序员,十分优秀!