Chinese language codes

后端 未结 2 1489
野的像风
野的像风 2021-02-13 10:55

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

I\'m getting a run time error when trying t

相关标签:
2条回答
  • 2021-02-13 11:23

    Simplified: CN (Mainland China), SG(Singapore). Traditional: TW (Taiwan), MO (Macau), HK (Hong Kong).

    0 讨论(0)
  • 2021-02-13 11:26

    I'd take a look here:

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

    Specifically,

    /*
    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)
    
    */
    

    and:

    The list of cultures in the Windows API is slightly different from the list of cultures in the .NET Framework. For example, the neutral culture zh-CHT "Chinese (Traditional)" with culture identifier 0x7C04 is not available in the Windows API. If interoperability with Windows is required (for example, through the p/invoke mechanism), use a specific culture that is defined in the operating system. This will ensure consistency with the equivalent Windows locale, which is identified with the same LCID.

    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?

    0 讨论(0)
提交回复
热议问题