Table of Contents

UseNationalLanguageSupport Method

Definition

Namespace
Codebelt.Extensions.Globalization
Assemblies
Codebelt.Extensions.Globalization.dll
Source
src/Codebelt.Extensions.Globalization/CultureInfoExtensions.cs

UseNationalLanguageSupport(CultureInfo)

Enriches the specified culture with the original Windows variant.

public static CultureInfo UseNationalLanguageSupport(this CultureInfo culture)

Parameters

culture CultureInfo

The 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.

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.