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.
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" />
                    
Directory.Packages.props
<PackageReference Include="XiHan.Framework.Localization.InMemory" />
                    
Project file
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
                    
#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
                    
Install as a Cake Addin
#tool nuget:?package=XiHan.Framework.Localization.InMemory&version=5.0.0-preview.1&prerelease
                    
Install as a Cake Tool

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 在任何地方都有默认语言文案;内核在每次调用入口把 Baggage xihan.locale 经 Negotiate 协商成启用的区域再安装作用域,与 context.Localize、Problem Details 同一区域。
  • 选项 XiHan:Localization:DefaultLocale(默认 en-US)与 XiHan:Localization:Locales(逗号分隔,默认内置 10 种)。

依赖方向

依赖 XiHan.Framework.Localization.Abstractions。

状态

P2:可用。

Product 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.

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