Documentation
¶
Overview ¶
Package localeutil 提供一些本地化的工具
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadMessageFromFS ¶ added in v0.2.0
func LoadMessageFromFS(b *catalog.Builder, fsys fs.FS, path string, unmarshal func([]byte, interface{}) error) error
LoadMessageFromFS 从文件系统中加载文件并写入 b
NOTE: unmarshal 必须要能解析 path 指向的文件
func LoadMessageFromFile ¶ added in v0.2.0
func LoadMessageFromFile(b *catalog.Builder, path string, unmarshal func([]byte, interface{}) error) error
LoadMessageFromFS 从文件中加载文件并写入 b
func SystemLanguageTag ¶
SystemLanguageTag 返回当前系统的本地化信息
*nix 系统会使用 LANG 环境变量中的值,windows 在 LANG 环境变量不存在的情况下,调用 GetUserDefaultLocaleName 函数获取。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.