Namespace Codebelt.Extensions.Globalization
The Codebelt.Extensions.Globalization namespace contains extension methods that is an addition to the System.Globalization namespace.
Availability: .NET 8, .NET 6 and .NET Standard 2.0
Complements: System.Globalization namespace 🔗
Extension Methods
| Type | Ext | Methods |
|---|---|---|
| CultureInfo | ⬇️ | UseNationalLanguageSupport |
CSharp Example
var danishCultureIcu = new CultureInfo("da-dk", false);
var danishCultureNls = new CultureInfo("da-dk", false).UseNationalLanguageSupport();
// danishCultureIcu outputs dd.MM.yyyy from danishCultureIcu.DateTimeFormat.ShortDatePattern
// danishCultureNls outputs dd-MM-yyyy from danishCultureNls.DateTimeFormat.ShortDatePattern
Classes
- CultureInfoExtensions
Extension methods for the CultureInfo class.