Diyar.Number2Words
1.0.2
dotnet add package Diyar.Number2Words --version 1.0.2
NuGet\Install-Package Diyar.Number2Words -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Diyar.Number2Words" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Diyar.Number2Words" Version="1.0.2" />
<PackageReference Include="Diyar.Number2Words" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Diyar.Number2Words --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Diyar.Number2Words, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Diyar.Number2Words@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Diyar.Number2Words&version=1.0.2
#tool nuget:?package=Diyar.Number2Words&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Diyar.Number2Words
A Powerful C# Library for converting number to word.
Supported Languages:
- English
- Kurdish
Supported Currencies:
- Dollar
- Dinar
- Euro
- Pound
- Toman
- Lira
Installation
.Net CLI:
dotnet add package Diyar.Number2Words
NPM:
NuGet\Install-Package Diyar.Number2Words
Import Package
using Diyar.Number2Words;
Example 1:
var number1 = "125750";
var example1 = number1.ToWords(culture: "ku", options: option =>
{
option.Currency = "IQD";
});
Output:
سەد و بیست و پێنج هەزار و حەوت سەد و پەنجا دینار
Example 2:
var number2 = "125.56";
var example2 = number2.ToWords(culture:"en", options: option =>
{
option.LetterCase = LetterCase.TitleCase;
option.Currency = "USD";
option.IgnoreFloatingPart = false;
option.Prefix = "";
option.Suffix = "";
option.UseOnlyClosing = false;
//option.RoundTo = 0;
});
Output:
One Hundred Twenty-Five Dollars And Fifty-Six Cents
Example 3:
var example3 = Number2Words.ToKurdishWords(21_756_985, options => { options.Currency = ""; });
Output:
بیست و یەک ملیۆن و حەوت سەد و پەنجا و شەش هەزار و نۆ سەد و هەشتا و پێنج
Example 4:
var example4 = Number2Words.ToEnglishWords(1_500_750);
Output:
One Million, Five Hundred Thousand, Seven Hundred Fifty
Example 5:
var example5 = Number2Words.ToWords(12345678900.00987654321, "en");
Output:
Twelve Billion, Three Hundred Forty-Five Million, Six Hundred Seventy-Eight Thousand, Nine Hundred Point Zero Zero Ninety-Nine
Example 6:
var example6 = Number2Words.ToWords(12345678900.00987654321, "ku");
Output:
دوازدە ملیار و سێ سەد و چل و پێنج ملیۆن و شەش سەد و حەفتا و هەشت هەزار و نۆ سەد پۆینت سفر سفر نەوەد و نۆ
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Update README file and fix minor bugs.