Skip to content

Processing locale data for internationalisation software using Unicode CLDR

License

Notifications You must be signed in to change notification settings

mikamikem/net-cldr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sepia.Globalization

build status Coverage Status NuGet docs

Provides locale content for internationalisation software using the Unicode Common Local Data Repository (CLDR).

Features

Getting started

Published releases of the package are available on NuGet. To install, run the following command in the Package Manager Console.

PM> Install-Package Sepia.Globalization

Usage

using Sepia.Globalization;

The CLDR uses the singleton pattern. To access the repository, use Cldr.Instance.

Ensure that the latest version of the CLDR is installed. This will download the latest published release from unicode.org, if required.

var version = Cldr.Instance.DownloadLatestAsync().Result;
Console.WriteLine($"Using CLDR {version}");

Query the CLDR for the fractional digits of the Japanese Yen (JPY)

var jpy = Cldr.Instance
    .GetDocuments("common/supplemental/supplementalData.xml")
    .FirstElement("supplementalData/currencyData/fractions/info[@iso4217='JPY']");
Assert.AreEqual("0", jpy.Attribute("digits").Value);

About

Processing locale data for internationalisation software using Unicode CLDR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%