CodeWF.Avalonia.Lang 12.1.6.8

dotnet add package CodeWF.Avalonia.Lang --version 12.1.6.8
                    
NuGet\Install-Package CodeWF.Avalonia.Lang -Version 12.1.6.8
                    
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="CodeWF.Avalonia.Lang" Version="12.1.6.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeWF.Avalonia.Lang" Version="12.1.6.8" />
                    
Directory.Packages.props
<PackageReference Include="CodeWF.Avalonia.Lang" />
                    
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 CodeWF.Avalonia.Lang --version 12.1.6.8
                    
#r "nuget: CodeWF.Avalonia.Lang, 12.1.6.8"
                    
#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 CodeWF.Avalonia.Lang@12.1.6.8
                    
#: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=CodeWF.Avalonia.Lang&version=12.1.6.8
                    
Install as a Cake Addin
#tool nuget:?package=CodeWF.Avalonia.Lang&version=12.1.6.8
                    
Install as a Cake Tool

CodeWF.Avalonia.Lang

Avalonia 国际化绑定:I18n 标记扩展与转换器,直接使用 CodeWF.Toolkit.Lang 唯一管理器、资源加载器与文化回退。Avalonia localization bindings for the shared CodeWF.Toolkit.Lang engine.

NuGet License

安装

dotnet add package CodeWF.Avalonia.Lang

nuget.org 上并存现行 12.1.6.x 与已废弃的历史 12.2.x 两条版本线(后者版本号更大),浮动解析会命中旧线;请逐包精确钉版到 12.1.6.*。

CodeWF.Toolkit.Lang 经传递依赖自动安装。本包不需要主题入口;唯一的管理器、JSON/XML/RESX 加载器与语言元数据均由 Toolkit 提供,运行时不创建另一套实例。

初始化(应用只做一次)

using CodeWF.Toolkit.Lang;
using CodeWF.Toolkit.Lang.Json;

I18nManager.Instance.Register(
    new JsonLangPlugin { ResourceFolder = Path.Combine(AppContext.BaseDirectory, "I18n") },
    CultureInfo.GetCultureInfo("zh-CN"));
I18nManager.Instance.Culture = CultureInfo.GetCultureInfo("en-US");

XAML 绑定

xmlns:codewf="https://codewf.com"

<TextBlock Text="{codewf:I18n {x:Static lang:ResourceKeys.Title}}" />

I18nExtension / I18nBinding 直接订阅管理器的 Culture 与 ResourceVersion:语言切换、运行时追加资源后现有控件自动刷新;支持固定语言、动态键与格式参数,查找按 请求语言 → 父语言 → 默认语言 回退。

资源覆盖

  • NuGet 库的 JSON 以 EmbeddedResource 嵌入程序集,由 JsonLocalizer 读取默认文案,宿主无需复制库资源。
  • 同键优先级:业务输出资源 > 外层库内嵌资源 > 内层依赖库内嵌资源;缺失键逐级回退,空字符串是有效覆盖。

强类型资源键

推荐 T4(Language.tt)生成并提交代码,普通构建无需执行模板;需要编译期生成时配套使用 CodeWF.Avalonia.Lang.Generator,把语言资源作为 AdditionalFiles 传入。

从 12.1.4.19 起,管理器/插件/语言元数据类型统一位于 CodeWF.Toolkit.Lang(含 Json / Xml / Resx 子命名空间),旧命名空间中的类型已移除;所有 CodeWF.Avalonia 运行时包应一起升级。

文档

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on CodeWF.Avalonia.Lang:

Package Downloads
CodeWF.Avalonia.Controls

Avalonia 基础自定义控件库:控件 API、状态模型、绘制逻辑、标记扩展与转换器,内置 Semi 主题资源(引导、传输列表、状态徽标、标题栏等)。Core custom control library for Avalonia with built-in Semi theme resources.

CodeWF.Avalonia.Markdown.Lite

Markdown 渲染基础包:基于 Avalonia 与 Markdig 的解析渲染引擎,只渲染常规元素(标题/段落/列表/引用/表格/链接/代码块单色/图片替代文本/公式原文),并内置 18 套排版主题。Markdown rendering engine with built-in typography themes, no heavy capability dependencies.

CodeWF.Avalonia.Markdown

Markdown 完整包:在 Lite 渲染引擎之上提供图片(GIF/SVG/预览)、数学公式、Mermaid 图表、TextMate 代码高亮、行内样式(span style 字号/前景色/背景色,含选区浮动条与可读性回退)、PNG/PDF/Word/公众号 HTML 导出,以及源码编辑器与单栏实时编辑(所见即所得)控件,并内置能力控件主题。Full Markdown package: images, math, mermaid, highlighting, inline span styles (font size / foreground / background with selection bar and readability fallback), export and editors on top of the Lite engine.

CodeWF.Avalonia.Log

面向 Avalonia 的日志查看控件与桌面通知:基于轻量日志核心展示实时日志、级别过滤与界面友好内容,适合桌面应用内嵌日志观察台。Avalonia log viewer control with desktop notifications on top of the lightweight logging core.

CodeWF.Avalonia.TreeDataGrid

社区版 TreeDataGrid.Avalonia 的增强扩展:三态排序(升/降/取消)、Ctrl+A 全选与智能 ToolTip,内置 Semi 主题(本地 vendor 副本,不依赖商业版 TreeDataGrid);另含通用属性面板控件 PropertyGrid(对标 Visual Studio 属性窗口:分类/字母双视图、无限层级、搜索、描述面板、多类型编辑器)。Enhancements for the community TreeDataGrid.Avalonia control with a vendored Semi theme, plus a generic PropertyGrid control.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
12.1.6.8 0 11/20/2026
12.1.6.5 144 11/16/2026
12.1.6.4 170 11/12/2026
12.1.6.3 163 11/11/2026
12.1.6.2 150 11/10/2026
12.1.6.1 140 11/10/2026
12.1.5.11 141 11/10/2026
12.1.5.10 148 11/10/2026
12.1.5.9 138 11/10/2026
12.1.5.8 143 11/9/2026
12.1.5.7 146 11/9/2026
12.1.5.6 173 11/9/2026
12.1.5.4 149 11/8/2026
12.1.5.3 138 11/8/2026
12.1.5.2 203 11/8/2026
12.1.5.1 144 11/8/2026
Loading failed