UseNationalLanguageSupport Method
Definition
- Namespace
- Codebelt.Extensions.Globalization
- Assemblies
- Codebelt.Extensions.Globalization.dll
UseNationalLanguageSupport(CultureInfo)
Enriches the specified culture with the original Windows variant.
public static CultureInfo UseNationalLanguageSupport(this CultureInfo culture)
Parameters
cultureCultureInfoThe 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
cultureis null.
UseNationalLanguageSupport(IEnumerable<CultureInfo>)
Enriches the specified cultures with the original Windows variant.
public static IEnumerable<CultureInfo> UseNationalLanguageSupport(this IEnumerable<CultureInfo> cultures)
Parameters
culturesIEnumerable<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
culturesis null.