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
LinguasSorted returns the languages sorted by humanly expected ordering.
func (Lingua) AuditHeight ¶ added in v1.3.263
func (Lingua) Directory ¶ added in v1.3.186
Directory returns the directory containing the language.
func (Lingua) GroupMembers ¶ added in v1.3.263
GroupMembers returns all additional members of a language group. Groups use the same file, but have {{if eq Lang ...}} template commands for minor differences.
func (Lingua) UseEbitenText ¶ added in v1.4.33
UseEbitenText returns whether using ebiten/text for font drawing is safe.