i18n

package
v0.0.0-...-900ead6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetI18nMessage

func GetI18nMessage(code string, lang string) string

GetI18nMessage return i18n message

func GetLanguage

func GetLanguage(ctx *gin.Context) string

GetLanguage parse request language

func Setup

func Setup()

Setup init i18n config

Types

type Configure

type Configure struct {
	UserAgentTags    []string `env:"I18N_USERAGENT_TAGS" envDefault:"" envSeparator:":"` // lang-en:lang-ko:lang-zh:lang-zh:lang-zh:lang-ja
	SupportLanguages []language.Tag
}

Configure config for i18n

var Config Configure

Config global defined i18n config

Jump to

Keyboard shortcuts

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