Class CultureInfoExtensions
- Namespace
- Cuemon.Extensions.Globalization
- Assembly
- Cuemon.Extensions.Globalization.dll
Extension methods for the CultureInfo class.
public static class CultureInfoExtensions
- Inheritance
-
CultureInfoExtensions
Methods
UseNationalLanguageSupport(IEnumerable<CultureInfo>)
Enriches the specified cultures
with the original Windows variant.
public static IEnumerable<CultureInfo> UseNationalLanguageSupport(this IEnumerable<CultureInfo> cultures)
Parameters
cultures
IEnumerable<CultureInfo>The sequence of CultureInfo to extend.
Returns
- IEnumerable<CultureInfo>
A sequence of CultureInfo objects enriched with the original Windows variant.
Remarks
Replaces the value on the public writable properties of DateTimeFormat and NumberFormat to favor NLS (https://learn.microsoft.com/en-us/windows/win32/intl/national-language-support) instead of ICU (http://site.icu-project.org/home).
Exceptions
- ArgumentNullException
cultures
is null.
UseNationalLanguageSupport(CultureInfo)
Enriches the specified culture
with the original Windows variant.
public static CultureInfo UseNationalLanguageSupport(this CultureInfo culture)
Parameters
culture
CultureInfoThe of CultureInfo to extend.
Returns
- CultureInfo
A CultureInfo object enriched with the original Windows variant.
Remarks
Replaces the value on the public writable properties of DateTimeFormat and NumberFormat to favor NLS (https://learn.microsoft.com/en-us/windows/win32/intl/national-language-support) instead of ICU (http://site.icu-project.org/home).
Exceptions
- ArgumentNullException
culture
is null.