package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Mar 17, 2026
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Init 初始化 i18n,解析语言偏好并加载翻译文件。
传入空字符串时自动从环境变量检测。
SetLang 切换语言并重建 localizer(用于 --lang flag 覆盖)。
T 根据 messageID 返回当前语言的翻译文本。
找不到时 fallback 到 messageID 本身。
Tf 带模板参数的翻译,data 为 map[string]any。
Source Files
¶
Click to show internal directories.
Click to hide internal directories.