i118Utils

package
v0.0.0-...-66d4e42 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var I118Prt *message.Printer

Functions

func Check

func Check(e error)

func InitI118

func InitI118(lang string)

func InitRes

func InitRes(jsonPath string)

func InitResFromAsset

func InitResFromAsset(bytes []byte)

func ReadI18nJson

func ReadI18nJson(file string) string

func Sprintf

func Sprintf(tmpl string, params ...interface{}) (ret string)

Types

type I18n

type I18n struct {
	Language string    `json:"language"`
	Messages []Message `json:"messages"`
}

type Message

type Message struct {
	Id          string `json:"id"`
	Message     string `json:"message,omitempty"`
	Translation string `json:"translation,omitempty"`
}

Jump to

Keyboard shortcuts

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