Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocaleCatalog ¶
type LocaleCatalog struct { //Tag is which locale was actually used to find these translations (e.g. I asked for en-US and am getting en) Tag language.Tag //Path is the filesystem path for the source of the catalog Path string Translations map[string]*Translation }
LocaleCatalog represents the translations provided by a TranslationStore
func NewLocaleCatalog ¶
func NewLocaleCatalog(tag language.Tag) LocaleCatalog
NewLocaleCatalog creates an empty LocaleCatalog for the supplied language
type Translation ¶
Translation is the struct for the Translations parsed via Po or Mo files and all coming parsers
func NewTranslation ¶
func NewTranslation() *Translation
NewTranslation returns the initialized Translation
func (*Translation) Get ¶
func (t *Translation) Get() string
Get returns the string of the translation
type TranslationStore ¶
type TranslationStore interface {
GetTranslations(tag language.Tag) (LocaleCatalog, error)
}
TranslationStore is implemented by packages that offer a way to load translations.
Click to show internal directories.
Click to hide internal directories.