Making.Localization
1.0.4-preview
This is a prerelease version of Making.Localization.
dotnet add package Making.Localization --version 1.0.4-preview
NuGet\Install-Package Making.Localization -Version 1.0.4-preview
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="Making.Localization" Version="1.0.4-preview" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Making.Localization" Version="1.0.4-preview" />
<PackageReference Include="Making.Localization" />
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 Making.Localization --version 1.0.4-preview
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Making.Localization, 1.0.4-preview"
#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 Making.Localization@1.0.4-preview
#: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=Making.Localization&version=1.0.4-preview&prerelease
#tool nuget:?package=Making.Localization&version=1.0.4-preview&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Making.Localization
Enterprise-grade localization and internationalization support for the Making framework.
Key Features
- Multi-Source Localization: JSON files, embedded resources, and custom contributors
- Culture Fallback: Automatic fallback to parent cultures and default culture
- Resource Management: Pluggable resource management with caching support
- Performance Optimized: In-memory caching with configurable expiration
- Multi-Tenant Support: Culture-specific localization per tenant
- Hot Reload: File watching and automatic resource reloading
- Extensible Architecture: Custom resource contributors and providers
Architecture
Core Components
IMakingStringLocalizer
Enhanced localizer interface with:
- Culture-specific localization
- Fallback mechanisms
- Nested key support
- Format string handling
ILocalizationResourceManager
Resource management with:
- Multi-source resource loading
- Culture hierarchy support
- Caching mechanisms
- Dynamic resource updates
Resource Contributors
- JsonFileLocalizationResourceContributor: File-based localization
- EmbeddedResourceLocalizationResourceContributor: Assembly embedded resources
- Custom Contributors: Extensible contributor pattern
Usage Examples
Basic Setup
services.AddMakingLocalizationWithDefaults("Resources/Localization");
Advanced Configuration
services.AddMakingLocalization(options =>
{
options.DefaultCulture = "en";
options.SupportedCultures = new[] { "en", "zh-CN", "ja", "ko" };
options.FallbackToDefaultCulture = true;
options.EnableCaching = true;
options.WatchForChanges = true;
});
services.AddJsonFileLocalizationContributor("Resources/Localization");
services.AddEmbeddedLocalizationContributor<MyResourceClass>();
Resource Files Structure
Resources/Localization/
├── en.json
├── zh-CN.json
├── ja.json
└── ko.json
JSON Resource Format
{
"welcome": "Welcome to Making Framework",
"user": {
"profile": "User Profile",
"settings": "User Settings"
},
"validation": {
"required": "The {0} field is required",
"email": "Please enter a valid email address"
}
}
Usage in Code
public class UserController : ControllerBase
{
private readonly IMakingStringLocalizer _localizer;
public UserController(IMakingStringLocalizer localizer)
{
_localizer = localizer;
}
public IActionResult GetWelcome()
{
var message = _localizer["welcome"];
var userProfile = _localizer["user.profile"];
var validation = _localizer["validation.required", "Email"];
return Ok(new { message, userProfile, validation });
}
}
Professional Features
- Enterprise Ready: Comprehensive logging, error handling, and monitoring
- Performance Optimized: Smart caching and efficient resource loading
- Scalable Architecture: Plugin-based design for custom scenarios
- Culture Management: Advanced culture hierarchy and fallback support
- Developer Experience: IntelliSense support and compile-time checking
- Production Ready: Configuration validation and health checks
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 is compatible. 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
- Making.Core (>= 1.0.4-preview)
- Making.MultiTenancy.Abstractions (>= 1.0.4-preview)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Localization (>= 8.0.0)
- Microsoft.Extensions.Logging (>= 8.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
- System.Text.Json (>= 8.0.0)
-
net9.0
- Making.Core (>= 1.0.4-preview)
- Making.MultiTenancy.Abstractions (>= 1.0.4-preview)
- Microsoft.Extensions.DependencyInjection (>= 9.0.0)
- Microsoft.Extensions.Localization (>= 9.0.0)
- Microsoft.Extensions.Logging (>= 9.0.0)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.0)
- System.Text.Json (>= 9.0.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 |
---|---|---|
1.0.4-preview | 87 | 8/10/2025 |