i18n

package
v0.0.0-...-9da1c94 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: AGPL-3.0, AGPL-3.0-or-later Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ERR_CANT_CREATE_REGISTRY_FOLDER I18NKey = "ERR_CANT_CREATE_REGISTRY_FOLDER"
	ERR_CANT_DOWNLOAD_LANG                  = "ERR_CANT_DOWNLOAD_LANG"
	ERR_CANT_EXEC_FUNC_IN_PACKAGE           = "ERR_CANT_EXEC_FUNC_IN_PACKAGE"
	ERR_CANT_LOAD_PRIV_KEY                  = "ERR_CANT_LOAD_PRIV_KEY"
	ERR_CANT_PUSH_PACKAGE                   = "ERR_CANT_PUSH_PACKAGE"
	ERR_CANT_READ_RESPONSE                  = "ERR_CANT_READ_RESPONSE"
	ERR_CANT_SAVE_FILE                      = "ERR_CANT_SAVE_FILE"
	ERR_CANT_UPDATE_LANG_FILE               = "ERR_CANT_UPDATE_LANG_FILE"
	ERR_INSUFFICIENT_ARGS                   = "ERR_INSUFFICIENT_ARGS"
	ERR_INVALID_PACKAGE_NAME                = "ERR_INVALID_PACKAGE_NAME"
	ERR_TOO_MANY_ARGS                       = "ERR_TOO_MANY_ARGS"
	INFO_PUSHED                             = "INFO_PUSHED"
	INFO_NOTHING_TO_PUSH                    = "INFO_NOTHING_TO_PUSH"
	INFO_TAGGED                             = "INFO_TAGGED"
	LBL_LS_HEADER                           = "LBL_LS_HEADER"
	LBL_LS_HEADER_PLUS                      = "LBL_LS_HEADER_PLUS"
	LBL_MAN_FX_HEADER                       = "LBL_MAN_FX_HEADER"
)

Variables

This section is empty.

Functions

func Err

func Err(artHome string, err error, key I18NKey, a ...interface{})

Err checks for the error and if it exists prints a localised error

func Printf

func Printf(artHome string, key I18NKey, a ...interface{})

Printf prints a localised message

func Raise

func Raise(artHome string, key I18NKey, a ...interface{})

raise an error

func Sprintf

func Sprintf(artHome string, key I18NKey, a ...interface{}) string

Sprintf formats according to a format specifier and returns the resulting string

func String

func String(artHome string, key I18NKey) string

func Update

func Update(i18nFile string) error

updates a specific i18n file by adding missing keys but keeping their value in english

Types

type I18NKey

type I18NKey string

Jump to

Keyboard shortcuts

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