Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
global variable to keep localizer object used to translate everything in application
View Source
var T = func(messageID string, template interface{}) string { if Localizer == nil { SetLanguage("") } msg := Localizer.MustLocalize(&i18n.LocalizeConfig{ MessageID: messageID, TemplateData: template}) return msg }
One of 2 main methods to translate message ID text, using format functionality based on template interface.
View Source
var TP = func(messageID string, template interface{}, pluralCount interface{}) string { if Localizer == nil { SetLanguage("") } msg := Localizer.MustLocalize(&i18n.LocalizeConfig{ MessageID: messageID, TemplateData: template, PluralCount: pluralCount}) return msg }
One of 2 main methods to translate message ID text, using format functionality based on template interface. Extra functionality allow to control plural form behavior.
Functions ¶
Types ¶
This section is empty.
Source Files
¶
- common.go
- localization.go
Click to show internal directories.
Click to hide internal directories.