Skip to content

Commit 67cd567

Browse files
authored
Merge pull request #11472 from dotnet/copilot/fix-11388
Fix incorrect ThreeLetterWindowsLanguageName example for zh-Hant (CHT -> ZHH)
2 parents b7e2997 + ce61510 commit 67cd567

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

snippets/csharp/System.Globalization/CultureInfo/DisplayName/getcultures.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME
3232
ar ar ara ARA Arabic Arabic
3333
bg bg bul BGR Bulgarian Bulgarian
3434
ca ca cat CAT Catalan Catalan
35-
zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified)
3635
cs cs ces CSY Czech Czech
3736
da da dan DAN Danish Danish
3837
de de deu DEU German German
@@ -41,9 +40,10 @@ en en eng ENU English English
4140
es es spa ESP Spanish Spanish
4241
fi fi fin FIN Finnish Finnish
4342
zh zh zho CHS Chinese Chinese
44-
zh-Hant zh zho CHT Chinese (Traditional) Chinese (Traditional)
45-
zh-CHS zh zho CHS Chinese (Simplified) Legacy Chinese (Simplified) Legacy
46-
zh-CHT zh zho CHT Chinese (Traditional) Legacy Chinese (Traditional) Legacy
43+
zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified)
44+
zh-Hant zh zho ZHH Chinese (Traditional) Chinese (Traditional)
45+
46+
Note: zh-Hant returns ZHH when using ICU (default). When NLS mode is enabled, it returns CHT.
4747
4848
*/
4949
// </snippet1>

snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.GetCultures/VB/getcultures.vb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ Module Module1
2929
'ar ar ara ARA Arabic Arabic
3030
'bg bg bul BGR Bulgarian Bulgarian
3131
'ca ca cat CAT Catalan Catalan
32-
'zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified)
3332
'cs cs ces CSY Czech Czech
3433
'da da dan DAN Danish Danish
3534
'de de deu DEU German German
@@ -38,9 +37,10 @@ Module Module1
3837
'es es spa ESP Spanish Spanish
3938
'fi fi fin FIN Finnish Finnish
4039
'zh zh zho CHS Chinese Chinese
41-
'zh-Hant zh zho CHT Chinese (Traditional) Chinese (Traditional)
42-
'zh-CHS zh zho CHS Chinese (Simplified) Legacy Chinese (Simplified) Legacy
43-
'zh-CHT zh zho CHT Chinese (Traditional) Legacy Chinese (Traditional) Legacy
40+
'zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified)
41+
'zh-Hant zh zho ZHH Chinese (Traditional) Chinese (Traditional)
42+
'
43+
'Note: zh-Hant returns ZHH when using ICU (default). When NLS mode is enabled, it returns CHT.
4444

4545
End Module
4646
' </snippet1>

xml/System.Globalization/CultureInfo.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3378,7 +3378,7 @@ The following code example shows that CultureInfo.Clone also clones the <xref:Sy
33783378
The following code example displays several properties of the neutral cultures.
33793379
33803380
> [!NOTE]
3381-
> The example displays the older `zh-CHS` and `zh-CHT` culture names with the 0x0004 and 0x7C04 culture identifiers, respectively. However, your Windows Vista applications should use the `zh-Hans` name instead of zh-CHS and the `zh-Hant` name instead of zh-CHT. The `zh-Hans` and `zh-Hant` names represent the current standard, and should be used unless you have a reason for using the older names.
3381+
> The `zh-Hans` and `zh-Hant` names represent the current standard for Chinese cultures. Older applications might reference the legacy `zh-CHS` and `zh-CHT` culture names, but these should be replaced with `zh-Hans` and `zh-Hant` respectively in modern applications.
33823382
33833383
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/DisplayName/getcultures.cs" id="Snippet1":::
33843384
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo.GetCultures/VB/getcultures.vb" id="Snippet1":::

0 commit comments

Comments
 (0)