Kck.Localization.Abstractions
4.7.0
See the version list below for details.
dotnet add package Kck.Localization.Abstractions --version 4.7.0
NuGet\Install-Package Kck.Localization.Abstractions -Version 4.7.0
<PackageReference Include="Kck.Localization.Abstractions" Version="4.7.0" />
<PackageVersion Include="Kck.Localization.Abstractions" Version="4.7.0" />
<PackageReference Include="Kck.Localization.Abstractions" />
paket add Kck.Localization.Abstractions --version 4.7.0
#r "nuget: Kck.Localization.Abstractions, 4.7.0"
#:package Kck.Localization.Abstractions@4.7.0
#addin nuget:?package=Kck.Localization.Abstractions&version=4.7.0
#tool nuget:?package=Kck.Localization.Abstractions&version=4.7.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
using Kck.Localization.Abstractions;
// Program.cs — the service and a resource provider (Kck.Localization.Json or .Yaml)
builder.Services.AddKckLocalization(options =>
{
options.ResourcePath = "Resources"; // Resources/en.json, Resources/tr.json ...
options.DefaultCulture = "en";
});
builder.Services.AddKckLocalizationJson();
// Use ILocalizationService in a handler
public class NotificationHandler(ILocalizationService localizer)
{
public Task<string> WelcomeAsync(string culture, CancellationToken ct) =>
localizer.GetStringAsync("welcome.message", culture, ct);
public Task<string> GreetAsync(string name, string culture, CancellationToken ct) =>
localizer.GetStringAsync("greeting", culture, [name], ct); // "Hello {0}"
public Task ReloadAsync(CancellationToken ct) => localizer.ReloadAsync(ct); // pick up changed files
}
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
Core ILocalizationService implementation with culture fallback, caching layer, and missing-key handling. Acts as the orchestrator for resource providers (JSON, YAML). Registered via AddKckLocalization(). |
|
|
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.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(). |
GitHub repositories
This package is not used by any popular GitHub repositories.