Table of Contents

Class CultureInfoExtensions

Namespace
Cuemon.Extensions.Globalization
Assembly
Cuemon.Extensions.Globalization.dll

Extension methods for the System.Globalization.CultureInfo class.

public static class CultureInfoExtensions
Inheritance
Object
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 System.Globalization.CultureInfo to extend.

Returns

IEnumerable<CultureInfo>

A sequence of System.Globalization.CultureInfo objects enriched with the original Windows variant.

Remarks

Replaces the value on the public writable properties of System.Globalization.CultureInfo.DateTimeFormat and System.Globalization.CultureInfo.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

System.ArgumentNullException

cultures is null.

UseNationalLanguageSupport(CultureInfo)

Enriches the specified culture with the original Windows variant.

public static CultureInfo UseNationalLanguageSupport(this CultureInfo culture)

Parameters

culture CultureInfo

The of System.Globalization.CultureInfo to extend.

Returns

CultureInfo

A System.Globalization.CultureInfo object enriched with the original Windows variant.

Remarks

Replaces the value on the public writable properties of System.Globalization.CultureInfo.DateTimeFormat and System.Globalization.CultureInfo.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

System.ArgumentNullException

culture is null.