Everlong.Globalization
0.3.0
Prefix Reserved
dotnet add package Everlong.Globalization --version 0.3.0
NuGet\Install-Package Everlong.Globalization -Version 0.3.0
<PackageReference Include="Everlong.Globalization" Version="0.3.0" />
<PackageVersion Include="Everlong.Globalization" Version="0.3.0" />
<PackageReference Include="Everlong.Globalization" />
paket add Everlong.Globalization --version 0.3.0
#r "nuget: Everlong.Globalization, 0.3.0"
#:package Everlong.Globalization@0.3.0
#addin nuget:?package=Everlong.Globalization&version=0.3.0
#tool nuget:?package=Everlong.Globalization&version=0.3.0
Everlong.Globalization
Zero-dependency .NET library for runtime locale switching, string lookup, and ICU MessageFormat formatting.
dotnet add package Everlong.Globalization
Quick start
using Everlong.Globalization;
// Create a provider with your string dictionary
var en = new DictionaryStringProvider(new Dictionary<string, string>
{
["App.Greeting"] = "Hello, {name}!",
["App.Button.Submit"] = "Submit",
});
var provider = new LangProvider(en);
string msg = provider.GetString("App.Greeting", "Hello!");
// Swap locale at runtime — all existing references update instantly
var zhCn = new DictionaryStringProvider(new Dictionary<string, string>
{
["App.Greeting"] = "你好,{name}!",
["App.Button.Submit"] = "提交",
});
provider.Use(zhCn);
Key types
| Type | Description |
|---|---|
IStringProvider |
Key-based string lookup with fallback |
DictionaryStringProvider |
Backed by IReadOnlyDictionary<string, string> |
ChainedStringProvider |
Primary → secondary chain; empty from primary falls through |
FallbackStringProvider |
Singleton — always returns the fallback value |
NullStringProvider |
Singleton — always returns fallback (for testing) |
LangProvider |
Mutable wrapper; swap the inner provider at runtime |
LangCoordinator |
Coordinate locale switching across multiple assemblies |
ILangManifest |
Multi-assembly coordination contract |
StringSectionBase |
INotifyPropertyChanged base for generated typed accessors |
IcuMessageFormatter |
Minimal ICU MessageFormat engine |
ICU MessageFormat
The built-in IcuMessageFormatter supports:
- Simple interpolation:
{name} - Select:
{gender, select, male {He} female {She} other {They}} - Plural:
{count, plural, one {# item} other {# items}} - Select ordinal:
{place, selectordinal, one {1st} two {2nd} few {3rd} other {#th}}
var fmt = new IcuMessageFormatter();
string result = fmt.Format("{count, plural, one {# item} other {# items}}",
new Dictionary<string, object> { ["count"] = 3 });
// → "3 items"
Code generation companion
This library is the runtime dependency for the dotnet-elg CLI tool
(Everlong.Globalization.Tools), which generates Lang.g.cs from
locale JSON files — providing typed accessors, format helpers, and
multi-assembly coordinator support.
dotnet tool install --global Everlong.Globalization.Tools
License
MIT — Copyright © 2026 Everlong Technology
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. |
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Everlong.Globalization:
| Package | Downloads |
|---|---|
|
Everlong.Nester.Extensions
Nester extensions — the MvvmTk layer: the component-model bases, the built-in dialog sessions, the notice contracts, the route-sync contracts and the policy-based authorization engine. |
GitHub repositories
This package is not used by any popular GitHub repositories.