i18nUtil

package
v0.0.0-...-3f9575c Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

i18nUtil package has dependency on a third party package. please install it first before using this package.

go get -v golang.org/x/text

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMsg

func GetMsg(tag string, key string, param ...interface{}) string

GetMsg to get the actual language text. tag parameter come from https://godoc.org/golang.org/x/text/language/display

English en
AmericanEnglish en-US
BritishEnglish en-GB
Chinese zh
SimplifiedChinese zh-Hans
TraditionalChinese zh-Hant

if key parameter value inside the properties file has substituition placeholder like %s or %d or %f please pass the actual run-time value into the param ...interface{}

func LoadProperties

func LoadProperties(tag string, propsFilename string) error

LoadProperties to parse the properties file to be stored internally. tag parameter values please refer to GetMsg

Types

This section is empty.

Jump to

Keyboard shortcuts

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