i18nKit

package
v3.0.19 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(bundle *i18n.Bundle, messageId string, langs ...string) (string, error)

GetMessage

@param langs 可以不传,此时将使用 bundle 的默认语言

func NewBundle

func NewBundle(defaultLanguage language.Tag, messageFilePaths ...string) (*i18n.Bundle, error)

NewBundle

@param defaultLanguage e.g. language.English || language.Chinese @param messageFilePaths (1) 可以为nil

(2) 支持的文件类型: toml、json、yaml、properties

Types

This section is empty.

Jump to

Keyboard shortcuts

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