Discover Packages
github.com/cozy/cozy-stack
pkg
i18n
package
Version:
v0.0.0-...-f5ed4d4
Opens a new window with list of versions in this module.
Published: Dec 3, 2026
License: AGPL-3.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 3 modules, 8 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Documentation
Documentation
¶
func LoadLocale(locale, contextName string, rawPO []byte)
func LocalizeTime(t time.Time, locale, layout string) string
func Translate(key, locale, contextName string, vars ...interface{}) string
func Translator(locale, contextName string) func(key string, vars ...interface{}) string
func TranslatorHTML(locale, contextName string) func(key string, vars ...interface{}) template.HTML
func LoadLocale(locale, contextName string , rawPO []byte )
LoadLocale creates the translation object for a locale from the content of a .po file
LocalizeTime transforms a date+time in a string for the given locale.
The layout is in the same format as the one given to time.Format.
func Translate(key, locale, contextName string , vars ...interface{}) string
Translate translates the given key on the specified locale.
Translator returns a translation function of the locale specified
TranslatorHTML returns a translation function of the locale specified, which
allow simple markup like **bold**.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.