|
44 | 44 |
|
45 | 45 | These culture type values are returned by the <xref:System.Globalization.CultureInfo.CultureTypes%2A?displayProperty=nameWithType> property, and also serve as a filter that limits the cultures returned by the <xref:System.Globalization.CultureInfo.GetCultures%2A?displayProperty=nameWithType> method. For more information on cultures, see <xref:System.Globalization.CultureInfo>.
|
46 | 46 |
|
47 |
| -Generally, your application should enumerate all cultures by using the `CultureTypes.AllCultures` value. This allows enumeration of custom cultures as well as the other culture types. |
| 47 | +Generally, you enumerate all cultures by using the `CultureTypes.AllCultures` value. This allows enumeration of custom cultures as well as the other culture types. |
48 | 48 |
|
49 | 49 | Note that all `CultureTypes` members have been deprecated except for `CultureTypes.AllCultures`, `CultureTypes.NeutralCultures`, and `CultureTypes.SpecificCultures`.
|
| 50 | +
|
| 51 | +.NET recognizes the following culture types, all of which are included in enumerations returned by the `CultureTypes.AllTypes` enumeration member: |
| 52 | +
|
| 53 | +- **Specific cultures**, which specify a country/region and a language. The names of these cultures follow RFC 4646. The format is \<languagecode2>-\<country/regioncode2>", where \<languagecode2> is a lowercase two-letter code derived from ISO 639-1, and \<country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, "en-US" for English (United States) is a specific culture. Custom specific cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a standards-compliant one. |
| 54 | +
|
| 55 | +- **Neutral cultures**, which specify a language without respect to a country/region. The names of neutral cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture. Custom neutral cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a two-letter code. |
50 | 56 |
|
| 57 | + The invariant culture is included in the array of cultures returned by the <xref:System.Globalization.CultureInfo.GetCultures%2A?displayProperty=nameWithType> method that specifies this value. |
| 58 | +
|
| 59 | +- Custom cultures. |
| 60 | +
|
| 61 | + In Windows versions prior to Windows 10, the `UserCustomCulture` value is assigned to custom cultures created by the developer. In Windows 10, the `UserCustomCulture` value is also assigned to system cultures that are not backed by a complete set of cultural data and that do not have unique local identifiers. (All cultures of type `UserCustomCulture` share a <xref:System.Globalization.CultureInfo.LCID%2A?displayProperty=nameWithType> value of `LOCALE_CUSTOM_UNSPECIFIED` (0x1000, or 4096)). As a result, the `CultureInfo.GetCultures(CultureTypes.UserCustomCulture)` method returns different sets of cultures on different Windows versions. |
| 62 | +
|
51 | 63 | ## Examples
|
52 | 64 |
|
53 | 65 | The following example demonstrates the `CultureTypes.AllCultures` enumeration member and the <xref:System.Globalization.CultureInfo.CultureTypes%2A> property.
|
@@ -201,17 +213,6 @@ On .NET Framework 4 and later versions and .NET Core running on Windows, it incl
|
201 | 213 | <MemberValue>1</MemberValue>
|
202 | 214 | <Docs>
|
203 | 215 | <summary>Cultures that are associated with a language but are not specific to a country/region. </summary>
|
204 |
| - <remarks> |
205 |
| - <format type="text/markdown"><![CDATA[ |
206 |
| - |
207 |
| -## Remarks |
208 |
| -
|
209 |
| -The names of .NET cultures consist of the lowercase two-letter code derived from ISO 639-1. For example: "en" (English) is a neutral culture. Custom cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a two-letter code. |
210 |
| - |
211 |
| - The invariant culture is included in the array of cultures returned by the <xref:System.Globalization.CultureInfo.GetCultures%2A?displayProperty=nameWithType> method that specifies this value. |
212 |
| - |
213 |
| - ]]></format> |
214 |
| - </remarks> |
215 | 216 | </Docs>
|
216 | 217 | </Member>
|
217 | 218 | <Member MemberName="ReplacementCultures">
|
@@ -275,17 +276,6 @@ The names of .NET cultures consist of the lowercase two-letter code derived from
|
275 | 276 | <MemberValue>2</MemberValue>
|
276 | 277 | <Docs>
|
277 | 278 | <summary>Cultures that are specific to a country/region. </summary>
|
278 |
| - <remarks> |
279 |
| - <format type="text/markdown"><![CDATA[ |
280 |
| - |
281 |
| -## Remarks |
282 |
| -
|
283 |
| -The names of these cultures follow RFC 4646 (Windows Vista and later). The format is "<languagecode2>-<country/regioncode2>", where <languagecode2> is a lowercase two-letter code derived from ISO 639-1 and <country/regioncode2> is an uppercase two-letter code derived from ISO 3166. For example, "en-US" for English (United States) is a specific culture. |
284 |
| -
|
285 |
| -Custom cultures (that is, cultures that are application- rather than system-defined) can have any user-specified name, not just a standard-compliant one. |
286 |
| - |
287 |
| - ]]></format> |
288 |
| - </remarks> |
289 | 279 | </Docs>
|
290 | 280 | </Member>
|
291 | 281 | <Member MemberName="UserCustomCulture">
|
@@ -317,15 +307,6 @@ Custom cultures (that is, cultures that are application- rather than system-defi
|
317 | 307 | <MemberValue>8</MemberValue>
|
318 | 308 | <Docs>
|
319 | 309 | <summary>**This member is deprecated.** Custom cultures created by the user.</summary>
|
320 |
| - <remarks> |
321 |
| - <format type="text/markdown"><![CDATA[ |
322 |
| - |
323 |
| -## Remarks |
324 |
| -
|
325 |
| -In Windows versions prior to Windows 10, the `UserCustomCulture` value is assigned to custom cultures created by the developer. In Windows 10, the `UserCustomCulture` value is also assigned to system cultures that are not backed by a complete set of cultural data and that do not have unique local identifiers. (All cultures of type `UserCustomCulture` share a <xref:System.Globalization.CultureInfo.LCID%2A?displayProperty=nameWithType> value of `LOCALE_CUSTOM_UNSPECIFIED` (0x1000, or 4096)). As a result, the `CultureInfo.GetCultures(CultureTypes.UserCustomCulture)` method returns different sets of cultures on different Windows versions. |
326 |
| - |
327 |
| - ]]></format> |
328 |
| - </remarks> |
329 | 310 | </Docs>
|
330 | 311 | </Member>
|
331 | 312 | <Member MemberName="WindowsOnlyCultures">
|
|
0 commit comments