Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Linguas = map[Lingua]struct{}{}
Linguas is the set of current languages that are translated "enough".
Functions ¶
func InitCurrent ¶
func InitCurrent()
InitCurrent identifies the system locale. Requires Linguas to have been set.
func ResetLanguage ¶ added in v1.3.103
func ResetLanguage()
ResetLanguage makes everything English again.
Types ¶
type IType ¶
type IType = gotext.Translator
IType is the type of a locale translator interface.
var GI IType
GI is the translation of the game but as an interface. Used to work around go vet as it can't figure out that G.Get isn't a printf-like function if it gets only one arg. See https://github.com/golang/go/issues/57288
type Lingua ¶
type Lingua string
Lingua identifies a language.
var Active Lingua
Active is the name of the current language.
var Current Lingua
Current returns the preferred system locale, intersected with available locales.
func LinguasSorted ¶
func LinguasSorted() []Lingua
Linguas returns the languages sorted by humanly expected ordering.