lang

package
v1.1.8-0...-5ee8a8c Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

README

Lang

such as The {0} field is required {1}

Optimization principle referred to in the OpenResty string concatenation using Lua table

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir(dir string) error

Dir translator dir

func File

func File(file string) error

File translator file

func Register

func Register(lang string, ts map[string]string) error

Register a translator provide by the trans name

func RegisterKey

func RegisterKey(lang string, key, tran string)

RegisterKey a translator provide by the key tran name

func RegisterKeys

func RegisterKeys(lang string, ks map[string]string)

RegisterKeys a translator provide by the key trans name

func Trans

func Trans(lang, key string, param ...string) string

Trans translator

func TransFile

func TransFile(f string) error

TransFile translator dir or file

func Transk

func Transk(lang, key string) string

Transk translator of key

Types

This section is empty.

Jump to

Keyboard shortcuts

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