language

package
v1.0.41 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PtBr     = "pt_br"
	Es       = "es"
	EnUs     = "en_us"
	Fr       = "fr"
	It       = "it"
	De       = "de"
	I18nHash = "#i18n"
)
View Source
const Context string = "example"

Variables

This section is empty.

Functions

func GetLang

func GetLang() map[string]map[string]string

func LoadLang

func LoadLang(lang map[string]map[string]string, context string, idiom string)

LoadLang carrega em memória o arquivo de tradução para determinado contexto e idioma

func ReplaceI18nQueries added in v1.0.11

func ReplaceI18nQueries(i18nLang, query string) string

ReplaceI18nQueries função responsável por substituir #i18n nas queries exemplo: SELECT fee_tag_adjetivo_m#i18n AS feeling_male FROM feelings_tags

func SetI18nQueryFields added in v1.0.17

func SetI18nQueryFields(lang, query string) string

SetI18nQueryFields substitui o hash #i18n pelo idioma correspondente configurado no atributo lang do repositório

func SetLang added in v1.0.16

func SetLang(lang *string, langArg string)

SetLang atribui valor à propriedade de idiomas do repositório

func Translate

func Translate(line string, idiom string, replacements []string) string

Translate substitui a chave de idiomas pelo seu valor correspondente definido no arquivo de tradução

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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