Documentation ¶
Overview ¶
Package locales provides l10n tools to render gettext text.
Translations are in the "translations" embedded folder.
Index ¶
- func Available() [][2]string
- func Load()
- type Locale
- func (t *Locale) Gettext(str string, vars ...interface{}) string
- func (t *Locale) Ngettext(str, plural string, n int, vars ...interface{}) string
- func (t *Locale) Npgettext(ctx, str, plural string, n int, vars ...interface{}) string
- func (t *Locale) Pgettext(ctx, str string, vars ...interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Locale ¶
type Locale struct { Translator gotext.Translator Tag language.Tag }
Locale combines a gotext.Translator instance for a given language identified by a language.Tag.
func LoadTranslation ¶
LoadTranslation loads the best match translation for a given locale code.
Click to show internal directories.
Click to hide internal directories.