Kck.Localization.Abstractions
3.4.0
dotnet add package Kck.Localization.Abstractions --version 3.4.0
NuGet\Install-Package Kck.Localization.Abstractions -Version 3.4.0
<PackageReference Include="Kck.Localization.Abstractions" Version="3.4.0" />
<PackageVersion Include="Kck.Localization.Abstractions" Version="3.4.0" />
<PackageReference Include="Kck.Localization.Abstractions" />
paket add Kck.Localization.Abstractions --version 3.4.0
#r "nuget: Kck.Localization.Abstractions, 3.4.0"
#:package Kck.Localization.Abstractions@3.4.0
#addin nuget:?package=Kck.Localization.Abstractions&version=3.4.0
#tool nuget:?package=Kck.Localization.Abstractions&version=3.4.0
Kck.Localization.Abstractions
Culture-aware localization abstractions with dynamic reload — look up translated strings by key and culture without coupling to JSON or YAML resource formats.
Installation
dotnet add package Kck.Localization.Abstractions
Quick Start
// Program.cs — register a concrete provider (e.g. Kck.Localization.Json)
builder.Services.AddKckJsonLocalization(options =>
{
options.ResourcePath = "Resources";
options.DefaultCulture = "en";
});
// Use ILocalizationService in a handler or middleware
public class NotificationHandler(ILocalizationService localizer)
{
public async Task<string> GetWelcomeMessageAsync(
string userId, string culture, CancellationToken ct)
{
// Simple key lookup
return await localizer.GetStringAsync("welcome.message", culture, ct);
}
public async Task<string> GetFormattedMessageAsync(
string key, string culture, object[] args, CancellationToken ct)
{
// Parameterized lookup — {0}, {1} substituted from args
return await localizer.GetStringAsync(key, culture, args, ct);
}
}
// Force reload of resource files (e.g. after hot-update)
await localizer.ReloadAsync(ct);
Configuration
| Property | Description | Default |
|---|---|---|
Localization:DefaultCulture |
Fallback culture when key missing | "en" |
Localization:ResourcePath |
Directory containing resource files | "Resources" |
Localization:EnableReload |
Watch files and reload on change | true |
Resources
| 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
- No dependencies.
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Kck.Localization.Abstractions:
| Package | Downloads |
|---|---|
|
Kck.Localization.Json
JSON file-backed ILocalizationService resource provider. Loads translations from JSON files per culture (e.g. en.json, tr.json) with optional hot-reload support. Registered via AddKckLocalizationJson(). |
|
|
Kck.Localization.Yaml
YAML file-backed ILocalizationService resource provider. Loads translations from YAML files per culture with optional hot-reload. Human-friendly alternative to JSON resources. Registered via AddKckLocalizationYaml(). |
|
|
Kck.Localization
Core ILocalizationService implementation with culture fallback, caching layer, and missing-key handling. Acts as the orchestrator for resource providers (JSON, YAML). Registered via AddKckLocalization(). |
GitHub repositories
This package is not used by any popular GitHub repositories.