本文介绍了中国语文codeS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在更新旧的.NET 1.1的网站2.0。目前,该网站支持中国(繁体)及中国(简体)

We are updating an old .net 1.1 website to 2.0. The site currently supports Chinese (Traditional) & Chinese (Simplified)

我越来越想检测语言和放大器时,运行时错误;文化用c $ CS的$:ZH-CHS(simified)及ZH-CHT(传统):

I'm getting a run time error when trying to detect the language & culture using the codes:zh-CHS (simified) & zh-CHT (traditional):

请选择一个特定的文化,比如ZH-CN ZH-HK,ZH-TW,ZH-MO,ZH-SG。

Please select a specific culture, such as zh-CN, zh-HK, zh-TW, zh-MO, zh-SG.

来源:System.Globalization.CultureInfo.CreateSpecificCulture(字符串名称)

From: System.Globalization.CultureInfo.CreateSpecificCulture(String name)

看来这些都是过时的语言/文化codeS。没有人有任何见解,以我可能会如何将这些语言映射到所支持特定的国家/文化?

It appears these are outdated language/culture codes. Does anyone have any insights as to how I might map these languages to specific countries / cultures that are supported?

推荐答案

我想看看这里:

http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.parent(VS.80).aspx

http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.parent(VS.80).aspx

具体而言,

/*
This code produces the following output.

SPECIFIC CULTURE                                  PARENT CULTURE
0x0404 zh-TW Chinese (Taiwan)                     0x7C04 zh-CHT Chinese (Traditional)
0x0804 zh-CN Chinese (People's Republic of China) 0x0004 zh-CHS Chinese (Simplified)
0x0C04 zh-HK Chinese (Hong Kong S.A.R.)           0x7C04 zh-CHT Chinese (Traditional)
0x1004 zh-SG Chinese (Singapore)                  0x0004 zh-CHS Chinese (Simplified)
0x1404 zh-MO Chinese (Macau S.A.R.)               0x7C04 zh-CHT Chinese (Traditional)

*/

文化的窗口列表  API是从稍微不同的  文化在.NET名单  框架。例如,中性  文化ZH-CHT中国(繁体)  与区域性标识符0x7C04不  可以在Windows的API中。如果  与Windows的互操作性是  必需的(例如,通过  的P / Invoke机制),使用特定的  即在确定的培养  操作系统。这将确保  与等效的一致性  Windows区域,这是确定  用相同的LCID

我将与ZH-CN坚持为简体,可能只挑别人的传统之一 - 也许你的大部分传统的用户都来自台湾

I would stick with zh-CN for the Simplified and probably just pick one of the others for Traditional - maybe most of your Traditional users are from Taiwan?

这篇关于中国语文codeS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 21:18