ApricotFramework.Intl.AspNetCore
0.1.0
Prefix Reserved
dotnet add package ApricotFramework.Intl.AspNetCore --version 0.1.0
NuGet\Install-Package ApricotFramework.Intl.AspNetCore -Version 0.1.0
<PackageReference Include="ApricotFramework.Intl.AspNetCore" Version="0.1.0" />
<PackageVersion Include="ApricotFramework.Intl.AspNetCore" Version="0.1.0" />
<PackageReference Include="ApricotFramework.Intl.AspNetCore" />
paket add ApricotFramework.Intl.AspNetCore --version 0.1.0
#r "nuget: ApricotFramework.Intl.AspNetCore, 0.1.0"
#:package ApricotFramework.Intl.AspNetCore@0.1.0
#addin nuget:?package=ApricotFramework.Intl.AspNetCore&version=0.1.0
#tool nuget:?package=ApricotFramework.Intl.AspNetCore&version=0.1.0
ApricotFramework.Intl
Message localization for .NET. Look a message up by id for a locale and substitute named placeholders into it, over translation sources you supply.
ApricotFramework.Intl is the zero-dependency core.
ApricotFramework.Intl.AspNetCore adds dependency-injection wiring, request-based locale
resolution, JSON translation sources, and an IStringLocalizer bridge so Razor and DataAnnotations
localize from the same files.
Install
dotnet add package ApricotFramework.Intl
For ASP.NET Core applications, install the integration package instead — it brings the core with it:
dotnet add package ApricotFramework.Intl.AspNetCore
Usage
// Program.cs
using ApricotFramework.Intl.AspNetCore;
builder.Services.AddIntlCore(builder.Configuration);
builder.Services.AddJsonTranslationSource("en-US", () => File.OpenRead("Translations/all.en.json"));
builder.Services.AddJsonTranslationSource("hy-AM", () => File.OpenRead("Translations/all.hy.json"));
// anywhere IIntlService is injected
var hello = intl.Format("messages.hello");
var welcome = intl.Format("messages.welcome", new Dictionary<string, object?> { ["name"] = "Apricot" });
var explicitLocale = intl.Format("messages.hello", "hy-AM");
Registration order does not matter, as long as everything is registered before the container is built.
Locale names are matched case-insensitively, and a locale with no entry is retried without its last
subtag before the fallback locale is tried — so hy-AM resolves against hy if that is what you
registered, and a matching language always beats the fallback language. See the
documentation for the full resolution order.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- ApricotFramework.Intl (>= 0.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 158 | 8/12/2026 |