Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I18nManager ¶
type I18nManager struct {
// contains filtered or unexported fields
}
I18nManager 全局并发安全
func NewI18nManager ¶
func NewI18nManager(localesDir string, defaultLangs ...string) (*I18nManager, error)
NewI18nManager 初始化并返回一个 I18nManager 实例
func (*I18nManager) GetTemplateLangMap ¶
func (m *I18nManager) GetTemplateLangMap(lang string) (map[string]string, error)
GetTemplateLangMap 获取指定语言的模板映射
func (*I18nManager) Translate ¶
func (m *I18nManager) Translate(data map[string]interface{}) map[string]interface{}
Translate 按照语言文件翻译数据中的字符串
Click to show internal directories.
Click to hide internal directories.