XiHan.Framework.Localization.InMemory
5.0.0-preview.1
Prefix Reserved
This is a prerelease version of XiHan.Framework.Localization.InMemory.
There is a newer prerelease version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package XiHan.Framework.Localization.InMemory --version 5.0.0-preview.1
NuGet\Install-Package XiHan.Framework.Localization.InMemory -Version 5.0.0-preview.1
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="XiHan.Framework.Localization.InMemory" Version="5.0.0-preview.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XiHan.Framework.Localization.InMemory" Version="5.0.0-preview.1" />
<PackageReference Include="XiHan.Framework.Localization.InMemory" />
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 XiHan.Framework.Localization.InMemory --version 5.0.0-preview.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XiHan.Framework.Localization.InMemory, 5.0.0-preview.1"
#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 XiHan.Framework.Localization.InMemory@5.0.0-preview.1
#: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=XiHan.Framework.Localization.InMemory&version=5.0.0-preview.1&prerelease
#tool nuget:?package=XiHan.Framework.Localization.InMemory&version=5.0.0-preview.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XiHan.Framework.Localization.InMemory
内存本地化。清单 role: default,提供 localization.resources@1;Profiles.Minimal 与 Profiles.Standard 都装配它。
语义
MessageLocalizer汇集 DI 里的全部MessageCatalog,既是IMessageLocalizer(显式区域)也是IMessageResolver(环境作用域);同一键先注册的目录优先。- 回退链:精确区域 → 启用列表里同语言的其他区域 → 默认区域 → 源语言
en-US;占位符按命中区域的文化格式化({amount:N2}在de-DE得到1.234,50)。 - 找不到键或占位符缺值时整条模板不采用,退回键与参数的描述(
kernel.feature.start_failed (id=…, reason=…))。 - 装配时注册原语层与内核的语言文件目录;启动时把本地化器设为进程默认
MessageScope(默认区域),于是KernelMessages.ManifestEmpty.L()、Error.Message在任何地方都有默认语言文案;内核在每次调用入口把 Baggagexihan.locale经Negotiate协商成启用的区域再安装作用域,与context.Localize、Problem Details 同一区域。 - 选项
XiHan:Localization:DefaultLocale(默认en-US)与XiHan:Localization:Locales(逗号分隔,默认内置 10 种)。
依赖方向
依赖 XiHan.Framework.Localization.Abstractions。
状态
P2:可用。
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.14)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Diagnostics.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options (>= 10.0.14)
- System.Threading.RateLimiting (>= 10.0.14)
- XiHan.Framework.Localization.Abstractions (>= 5.0.0-preview.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on XiHan.Framework.Localization.InMemory:
| Package | Downloads |
|---|---|
|
XiHan.Framework.Profiles.Minimal
曦寒框架 Minimal 组合包 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 5.0.0-preview.2 | 0 | 11/6/2026 |
| 5.0.0-preview.1 | 42 | 11/4/2026 |