goi18n

package
v1.8.74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: LGPL-3.0 Imports: 7 Imported by: 0

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 按照语言文件翻译数据中的字符串

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL