i18n

package
v0.0.0-...-cfa74d8 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgNotExist    = errors.New("message not exit")
	LocaleNotExist = errors.New("locale not exist")
)

Functions

This section is empty.

Types

type I18nLocale

type I18nLocale map[string]LocaleRender

I18nLocale @Date: 2023-01-12 15:17:58 国际信息

func (I18nLocale) GetWithData

func (l I18nLocale) GetWithData(key string, locale language.Tag, data ...any) string

GetWithData @Date 2023-01-12 16:37:57 @Param key string @Param data any @Param locale language.Tag @Description: 根据key和locale和data来渲染语言信息

func (I18nLocale) GetWithRaw

func (l I18nLocale) GetWithRaw(key string, locale language.Tag) string

GetWithRaw @Date 2023-01-12 17:08:54 @Param key string @Param locale language.Tag @Return string @Description: 不带任何参数直接获取语言信息

type LocaleRender

type LocaleRender = *viper.Viper

Jump to

Keyboard shortcuts

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