Vorn.Common.Localization
8.5.1
See the version list below for details.
dotnet add package Vorn.Common.Localization --version 8.5.1
NuGet\Install-Package Vorn.Common.Localization -Version 8.5.1
<PackageReference Include="Vorn.Common.Localization" Version="8.5.1" />
<PackageVersion Include="Vorn.Common.Localization" Version="8.5.1" />
<PackageReference Include="Vorn.Common.Localization" />
paket add Vorn.Common.Localization --version 8.5.1
#r "nuget: Vorn.Common.Localization, 8.5.1"
#:package Vorn.Common.Localization@8.5.1
#addin nuget:?package=Vorn.Common.Localization&version=8.5.1
#tool nuget:?package=Vorn.Common.Localization&version=8.5.1
Vorn.Common.Localization
This library provides composite localization services for .NET applications.
Features
Composite String Localizer
Combines multiple IStringLocalizer instances with configurable priority order. It searches through the localizers in the specified order and returns the first non-resource-not-found result.
Usage
- Configure the composite localizer in your
Program.csorStartup.cs:
using Vorn.Common.Localization;
builder.Services.ConfigureCompositeStringLocalizer(
typeof(SharedResource),
typeof(FeatureResource)
);
- Inject
IStringLocalizerin your components or services:
private readonly IStringLocalizer _localizer;
public MyComponent(IStringLocalizer localizer)
{
_localizer = localizer;
}
private string GetLocalizedText() => _localizer["HelloWorld"];
The localizer will first try to find the key in SharedResource, then in FeatureResource, and so on.
Configuration
Use ConfigureCompositeStringLocalizer to specify the resource types in priority order. The first type in the list has the highest priority.
| 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
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Localization (>= 8.0.21)
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 |
|---|---|---|
| 8.6.1 | 131 | 10/25/2025 |
| 8.6.0 | 129 | 10/25/2025 |
| 8.6.0-rc4 | 131 | 10/25/2025 |
| 8.6.0-rc3 | 149 | 10/24/2025 |
| 8.6.0-rc2 | 168 | 10/23/2025 |
| 8.6.0-rc1 | 165 | 10/20/2025 |
| 8.5.1 | 109 | 10/18/2025 |
| 8.5.0 | 109 | 10/18/2025 |
| 8.4.2 | 170 | 10/16/2025 |
| 8.4.1 | 167 | 10/16/2025 |
| 8.4.0 | 166 | 10/16/2025 |
| 8.3.5 | 164 | 10/15/2025 |
| 8.3.4 | 170 | 10/15/2025 |
| 8.3.3 | 173 | 10/15/2025 |
| 8.3.1 | 167 | 10/14/2025 |
| 8.3.0 | 170 | 10/14/2025 |
| 8.3.0-rc4 | 166 | 10/14/2025 |
| 8.3.0-rc3 | 171 | 10/13/2025 |
| 8.3.0-rc2 | 168 | 10/13/2025 |
| 8.3.0-rc1 | 170 | 10/13/2025 |
| 8.2.0-rc9 | 171 | 10/13/2025 |
| 8.2.0-rc8 | 168 | 10/13/2025 |
| 8.2.0-rc10 | 170 | 10/13/2025 |
| 1.0.0 | 177 | 10/5/2025 |