package
Version:
v0.0.0-...-7a4d71e
Opens a new window with list of versions in this module.
Published: Mar 8, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package locales provides l10n tools to render gettext text.
Translations are in the "translations" embedded folder.
-
func Available(tag language.Tag) [][2]string
-
func Load()
-
type Locale
-
func (t *Locale) Gettext(str string, vars ...any) string
-
func (t *Locale) Ngettext(str, plural string, n int, vars ...any) string
-
func (t *Locale) Npgettext(ctx, str, plural string, n int, vars ...any) string
-
func (t *Locale) Pgettext(ctx, str string, vars ...any) string
Available returns the available locales as a list of pair
containing the langage code and its localized name.
Load loads all the available translations.
Locale combines a gotext.Translator instance for a given language
identified by a language.Tag.
LoadTranslation loads the best match translation for a given locale code.
Gettext returns a translation.
Ngettext returns a pluralized translation.
Npgettext returns a pluralized contextualized translation.
Pgettext returns a contextualized translation.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.