language

package
v0.0.0-...-b8f9f05 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LangList is the list of available languages. It stores two-bytes codes
	LangList []string
)

Functions

func DefLang

func DefLang() string

DefLang returns the default language

func GetLang

func GetLang(state int, accept string) (lng string)

GetLang returns the first language from accept-language

func IsLang

func IsLang(code string) bool

IsLang checks if there is a language with code name

func LangMacro

func LangMacro(input string, state int, accept string, vde bool) string

LangMacro replaces all inclusions of $resname$ in the incoming text with the corresponding language resources, if they exist

func LangText

func LangText(in string, state int, accept string, vde bool) (string, bool)

LangText looks for the specified word through language sources and returns the meaning of the source if it is found. Search goes according to the languages specified in 'accept'

func UpdateLang

func UpdateLang(state int, name, value string, vde bool)

UpdateLang updates language sources for the specified state

Types

This section is empty.

Jump to

Keyboard shortcuts

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