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
                    
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="Everlong.Globalization" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Everlong.Globalization" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Everlong.Globalization" />
                    
Project file
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 Everlong.Globalization --version 0.3.0
                    
#r "nuget: Everlong.Globalization, 0.3.0"
                    
#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 Everlong.Globalization@0.3.0
                    
#: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=Everlong.Globalization&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Everlong.Globalization&version=0.3.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
0.3.0 203 9/15/2026
0.2.0 92 9/15/2026
0.1.0 128 8/3/2026
0.0.1 130 7/23/2026