Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

也许可以考虑支持从go:embed加载翻译文件 #16

Open
axiaoxin opened this issue Jun 29, 2022 · 1 comment
Open

也许可以考虑支持从go:embed加载翻译文件 #16

axiaoxin opened this issue Jun 29, 2022 · 1 comment

Comments

@axiaoxin
Copy link

No description provided.

@youthlin
Copy link

youthlin commented Jul 1, 2022

可以试下 https://github.com/youthlin/t 这个库,

// 【1】 load
t.Load("path/to/dir/or/po/mo/file")  // 加载指定路径
// or
t.LoadFS(fs) // 加载嵌入式文件系统
// 【2】 API
t.T("msg", args...)
t.N("msg_single", "msg_plural", n, args...)
t.X("msg_ctx", "msg", args...)
t.XN("msg_ctx", "msg_single", "msg_plural", n, args...)

(逃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants