formaui-net.Framework.Currencies
1.0.0-preview.27
Prefix Reserved
dotnet add package formaui-net.Framework.Currencies --version 1.0.0-preview.27
NuGet\Install-Package formaui-net.Framework.Currencies -Version 1.0.0-preview.27
<PackageReference Include="formaui-net.Framework.Currencies" Version="1.0.0-preview.27" />
<PackageVersion Include="formaui-net.Framework.Currencies" Version="1.0.0-preview.27" />
<PackageReference Include="formaui-net.Framework.Currencies" />
paket add formaui-net.Framework.Currencies --version 1.0.0-preview.27
#r "nuget: formaui-net.Framework.Currencies, 1.0.0-preview.27"
#:package formaui-net.Framework.Currencies@1.0.0-preview.27
#addin nuget:?package=formaui-net.Framework.Currencies&version=1.0.0-preview.27&prerelease
#tool nuget:?package=formaui-net.Framework.Currencies&version=1.0.0-preview.27&prerelease
Forma.Framework.Currencies
What is known about a currency apart from any culture: the ISO 4217 codes of the currencies in use, the number of decimal places an amount in each usually carries, and the symbol each is written with in a given culture. It suits anything that shows or edits money in a currency the application names, whatever culture the reader formats numbers in: a price field, a table of totals, a report.
Install
dotnet add package formaui-net.Framework.Currencies --prerelease
The catalog is static and registers nothing.
Reading the catalog
using System.Globalization;
using Forma.Framework.Currencies;
var hebrew = CultureInfo.GetCultureInfo("he-IL");
CurrencyCatalog.Contains("USD"); // true
CurrencyCatalog.GetMinorUnits("JPY"); // 0
CurrencyCatalog.GetSymbol("USD", hebrew); // "$"
CurrencyCatalog.GetSymbol("USD", CultureInfo.GetCultureInfo("en-AU")); // "USD", since "$" is the Australian dollar there
| Member | What it gives |
|---|---|
CurrencyCatalog.Codes |
The ISO 4217 codes of the currencies in use, in order. |
CurrencyCatalog.Contains(code) |
Whether the code is one of them. |
CurrencyCatalog.GetMinorUnits(code) |
The decimal places an amount in the currency usually carries: 2 for the US dollar, 0 for the yen, 3 for the Bahraini dinar. |
CurrencyCatalog.GetSymbol(code, culture) |
The symbol the culture writes the currency with, or the ISO code where the culture has none. |
A code outside the currencies in use, such as a retired one, is refused with an ArgumentException.
Writing an amount
CurrencyCatalog.FormatAmount writes an amount in a named currency the way the reader's culture writes
money, its pattern, separators and grouping, with the currency's symbol in that culture and its minor
units unless the call names other decimal places:
CurrencyCatalog.FormatAmount(1234.5m, "USD", CultureInfo.GetCultureInfo("en")); // "$1,234.50"
CurrencyCatalog.FormatAmount(1234.5m, "USD", CultureInfo.GetCultureInfo("de-DE")); // "1.234,50 $"
CurrencyCatalog.FormatAmount(549m, "CHF", CultureInfo.GetCultureInfo("en"), 0); // "CHF 549"
A price, a total or any amount a reader sees is written this way rather than with the C format
string, which writes the culture's own currency: the shekel for he-IL whatever the amount is in, and
¤ for a culture such as en that names no country. A symbol ending in a letter, such as CHF, stands
a no-break space from the digits, as CLDR writes it.
The symbol is looked up from the culture through the locales it derives from, as Unicode CLDR
defines them, so a culture CLDR names differently, such as zh-TW, finds the locale it belongs to.
Where the data comes from
The data is a snapshot of Unicode CLDR embedded in the assembly, so
nothing is fetched at run time; the release it was read from is recorded in the snapshot. CLDR's data
is under the Unicode License, whose notice the package carries in
THIRD-PARTY-NOTICES.md.
License
Apache License 2.0, under the repository's LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on formaui-net.Framework.Currencies:
| Package | Downloads |
|---|---|
|
formaui-net.Blazor
A Blazor component library for .NET 11: form inputs and pickers, dialogs, popovers and toasts, toolbars and menus, tabs and layout, file pickers, uploaders and viewers, icons, emoji and windows. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.27 | 56 | 12/3/2026 |
| 1.0.0-preview.26 | 67 | 12/3/2026 |
| 1.0.0-preview.25 | 65 | 12/2/2026 |
| 1.0.0-preview.24 | 89 | 12/1/2026 |
| 1.0.0-preview.23 | 128 | 11/30/2026 |
| 1.0.0-preview.22 | 120 | 11/30/2026 |
| 1.0.0-preview.21 | 114 | 11/29/2026 |
| 1.0.0-preview.20 | 122 | 11/26/2026 |
| 1.0.0-preview.19 | 124 | 11/26/2026 |
| 1.0.0-preview.18 | 114 | 11/26/2026 |
| 1.0.0-preview.17 | 112 | 11/26/2026 |
| 1.0.0-preview.16 | 104 | 11/24/2026 |
| 1.0.0-preview.15 | 111 | 11/23/2026 |
| 1.0.0-preview.14 | 105 | 11/23/2026 |
| 1.0.0-preview.13 | 96 | 11/21/2026 |
| 1.0.0-preview.12 | 102 | 11/20/2026 |
| 1.0.0-preview.11 | 101 | 11/18/2026 |
| 1.0.0-preview.10 | 106 | 11/17/2026 |
| 1.0.0-preview.9 | 135 | 11/17/2026 |
| 1.0.0-preview.8 | 111 | 11/17/2026 |
What this release changed is in Forma's changelog: https://github.com/FormaUI/Forma/blob/v1.0.0-preview.27/CHANGELOG.md