MessageFormat 0.1.0
See the version list below for details.
dotnet add package MessageFormat --version 0.1.0
NuGet\Install-Package MessageFormat -Version 0.1.0
<PackageReference Include="MessageFormat" Version="0.1.0" />
paket add MessageFormat --version 0.1.0
#r "nuget: MessageFormat, 0.1.0"
// Install MessageFormat as a Cake Addin #addin nuget:?package=MessageFormat&version=0.1.0 // Install MessageFormat as a Cake Tool #tool nuget:?package=MessageFormat&version=0.1.0
PHP has it. Java has it. Even JavaScript has it. It's time .NET joined in with support for the ICU Message Format.
How would you format "He found 1 result in 4 categories", or "She found 3 results in 1 category" without bloating your code with a billion if-statements? And when you have to translate it, then what?
How about something like:
````csharp
var pattern = @"{Gender, select,
male {He}
female {She}
other {They}
} found {ResultCount, plural,
zero {no results}
one {one result}
other {# results}
} in {CategoryCount, plural,
zero {0 categories}
one {one category}
other {# categories}
}.";
var mf = new MessageFormatter();
var result = mf.FormatMessage(pattern, new {
Gender = "male",
ResultsCount = 3,
CategoriesCount = 1
});
````
Check the README for more information.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
This package has no dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on MessageFormat:
Package | Downloads |
---|---|
BioEngine.Core
Package Description |
|
Tp.I18n
Public interfaces for Targetprocess internationalization |
|
I18Next.Net.ICU
Package Description |
GitHub repositories (6)
Showing the top 5 popular GitHub repositories that depend on MessageFormat:
Repository | Stars |
---|---|
files-community/Files
A modern file manager that helps users organize their files and folders.
|
|
marticliment/UniGetUI
UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
|
|
microsoft/devhome
The new Dev Home experience for Windows!
|
|
revenz/FileFlows
FileFlows is a file processing application that can execute actions against a file in a tree flow structure.
|
|
microsoft/devhomegithubextension
Dev Home GitHub Extension
|
Version | Downloads | Last updated |
---|---|---|
7.1.2 | 1,933 | 10/14/2024 |
7.1.1 | 2,852 | 9/28/2024 |
7.1.0 | 76,690 | 10/11/2023 |
7.0.0 | 10,475 | 8/22/2023 |
6.0.2 | 28,900 | 1/1/2023 |
6.0.1 | 490 | 12/23/2022 |
6.0.0 | 87,078 | 1/15/2022 |
5.0.1 | 53,202 | 4/27/2021 |
5.0.0 | 5,754 | 4/26/2021 |
4.0.0 | 76,329 | 12/5/2020 |
3.0.1 | 1,794,506 | 7/11/2018 |
3.0.0 | 1,356 | 7/10/2018 |
2.1.0 | 43,512 | 3/19/2018 |
2.0.1 | 22,351 | 6/27/2017 |
2.0.0 | 17,627 | 4/26/2017 |
1.1.0 | 7,673 | 1/12/2017 |
1.0.2 | 62,575 | 10/1/2015 |
1.0.1 | 1,352 | 9/8/2015 |
1.0.0 | 1,373 | 8/25/2015 |
0.1.7 | 1,340 | 8/25/2015 |
0.1.6 | 1,297 | 8/19/2015 |
0.1.5 | 2,338 | 4/13/2015 |
0.1.4 | 1,624 | 12/17/2014 |
0.1.3 | 1,540 | 12/6/2014 |
0.1.2 | 1,517 | 12/6/2014 |
0.1.1 | 1,595 | 12/6/2014 |
0.1.0 | 1,546 | 12/6/2014 |
0.1.0: First public release.