Documentation
¶
Overview ¶
Package i18n answers the words and dates a language reads on the public site.
Index ¶
Constants ¶
View Source
const DefaultLocale = "en-US"
DefaultLocale is the language the sources are written in.
Variables ¶
View Source
var DatePattern = Msgid("{day} {month} {year}")
DatePattern is the order a date reads in, naming each part it takes.
Functions ¶
Types ¶
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
Translator answers the words one language reads.
func (*Translator) Date ¶
func (t *Translator) Date(at time.Time) string
Date returns the date as the translator's language writes it.
func (*Translator) Get ¶
func (t *Translator) Get(msgid string) string
Get returns the message in the translator's language, the source word when it carries none.
Click to show internal directories.
Click to hide internal directories.