Versions in this module Expand all Collapse all v1 v1.0.0 Jul 26, 2021 Changes in this version + const DateFormatFull + const DateFormatLong + const DateFormatMedium + const DateFormatShort + const DateTimeFormatFull + const DateTimeFormatLong + const DateTimeFormatMedium + const DateTimeFormatShort + const PluralRuleFew + const PluralRuleMany + const PluralRuleOne + const PluralRuleOther + const PluralRuleTwo + const PluralRuleZero + const TimeFormatFull + const TimeFormatLong + const TimeFormatMedium + const TimeFormatShort + var FuncMap = template.FuncMap + func Copy(dst, src *Locale) + func FmtCurrency(locale string, currency string, number interface{}) (formatted string, err error) + func FmtCurrencyWhole(locale string, currency string, number interface{}) (formatted string, err error) + func FmtDateFull(locale string, tim time.Time) (formatted string, err error) + func FmtDateLong(locale string, tim time.Time) (formatted string, err error) + func FmtDateMedium(locale string, tim time.Time) (formatted string, err error) + func FmtDateShort(locale string, tim time.Time) (formatted string, err error) + func FmtDateTimeFull(locale string, tim time.Time) (formatted string, err error) + func FmtDateTimeLong(locale string, tim time.Time) (formatted string, err error) + func FmtDateTimeMedium(locale string, tim time.Time) (formatted string, err error) + func FmtDateTimeShort(locale string, tim time.Time) (formatted string, err error) + func FmtNumber(locale string, number interface{}) (formatted string, err error) + func FmtNumberWhole(locale string, number interface{}) (formatted string, err error) + func FmtPercent(locale string, number interface{}) (formatted string, err error) + func FmtTimeFull(locale string, tim time.Time) (formatted string, err error) + func FmtTimeLong(locale string, tim time.Time) (formatted string, err error) + func FmtTimeMedium(locale string, tim time.Time) (formatted string, err error) + func FmtTimeShort(locale string, tim time.Time) (formatted string, err error) + func Parse(locale, text string, args ...interface{}) (r string, err error) + func RegisterLocale(loc *Locale) + func RegisterLocales(locs ...*Locale) + func RegisterPluralRule(locale string, ruler PluralRuler) + func T(locale, key string, args ...interface{}) (formatted string, err error) + type Calendar struct + FormatNames CalendarFormatNames + Formats CalendarFormats + func (c Calendar) FmtDateFull(t time.Time) (string, error) + func (c Calendar) FmtDateLong(t time.Time) (string, error) + func (c Calendar) FmtDateMedium(t time.Time) (string, error) + func (c Calendar) FmtDateShort(t time.Time) (string, error) + func (c Calendar) FmtDateTimeFull(t time.Time) (string, error) + func (c Calendar) FmtDateTimeLong(t time.Time) (string, error) + func (c Calendar) FmtDateTimeMedium(t time.Time) (string, error) + func (c Calendar) FmtDateTimeShort(t time.Time) (string, error) + func (c Calendar) FmtTimeFull(t time.Time) (string, error) + func (c Calendar) FmtTimeLong(t time.Time) (string, error) + func (c Calendar) FmtTimeMedium(t time.Time) (string, error) + func (c Calendar) FmtTimeShort(t time.Time) (string, error) + func (c Calendar) Format(datetime time.Time, pattern string) (string, error) + type CalendarDateFormat struct + Full string + Long string + Medium string + Short string + type CalendarDayFormatNameValue struct + Fri string + Mon string + Sat string + Sun string + Thu string + Tue string + Wed string + type CalendarDayFormatNames struct + Abbreviated CalendarDayFormatNameValue + Narrow CalendarDayFormatNameValue + Short CalendarDayFormatNameValue + Wide CalendarDayFormatNameValue + type CalendarFormatNames struct + Days CalendarDayFormatNames + Months CalendarMonthFormatNames + Periods CalendarPeriodFormatNames + type CalendarFormats struct + Date CalendarDateFormat + DateTime CalendarDateFormat + Time CalendarDateFormat + type CalendarMonthFormatNameValue struct + Apr string + Aug string + Dec string + Feb string + Jan string + Jul string + Jun string + Mar string + May string + Nov string + Oct string + Sep string + type CalendarMonthFormatNames struct + Abbreviated CalendarMonthFormatNameValue + Narrow CalendarMonthFormatNameValue + Short CalendarMonthFormatNameValue + Wide CalendarMonthFormatNameValue + type CalendarPeriodFormatNameValue struct + AM string + PM string + type CalendarPeriodFormatNames struct + Abbreviated CalendarPeriodFormatNameValue + Narrow CalendarPeriodFormatNameValue + Short CalendarPeriodFormatNameValue + Wide CalendarPeriodFormatNameValue + type Currency struct + Currency string + DisplayName string + Symbol string + type Locale struct + Calendar Calendar + Locale string + Number Number + PluralRule string + func GetLocale(locale string) (*Locale, bool) + func (l *Locale) FmtCurrency(currency string, number interface{}) (formatted string, err error) + func (l *Locale) FmtCurrencyWhole(currency string, number interface{}) (formatted string, err error) + func (l *Locale) FmtDateFull(tim time.Time) (string, error) + func (l *Locale) FmtDateLong(tim time.Time) (string, error) + func (l *Locale) FmtDateMedium(tim time.Time) (string, error) + func (l *Locale) FmtDateShort(tim time.Time) (string, error) + func (l *Locale) FmtDateTimeFull(tim time.Time) (string, error) + func (l *Locale) FmtDateTimeLong(tim time.Time) (string, error) + func (l *Locale) FmtDateTimeMedium(tim time.Time) (string, error) + func (l *Locale) FmtDateTimeShort(tim time.Time) (string, error) + func (l *Locale) FmtNumber(number interface{}) string + func (l *Locale) FmtNumberWhole(number interface{}) string + func (l *Locale) FmtPercent(number interface{}) string + func (l *Locale) FmtTimeFull(tim time.Time) (string, error) + func (l *Locale) FmtTimeLong(tim time.Time) (string, error) + func (l *Locale) FmtTimeMedium(tim time.Time) (string, error) + func (l *Locale) FmtTimeShort(tim time.Time) (string, error) + func (l Locale) FuncMap() template.FuncMap + type Number struct + Currencies []Currency + Formats NumberFormats + Symbols Symbols + func (n Number) FmtCurrency(currency string, number float64) (formatted string, err error) + func (n Number) FmtCurrencyWhole(currency string, number float64) (formatted string, err error) + func (n Number) FmtNumber(number float64) string + func (n Number) FmtNumberWhole(number float64) string + func (n Number) FmtPercent(number float64) string + type NumberFormats struct + Currency string + Decimal string + Percent string + type NumberValue interface + type PluralRule string + func FindRule(locale string, count NumberValue) (rule PluralRule) + type PluralRuler interface + FindRule func(n NumberValue) PluralRule + type PluralRulerFunc func(n NumberValue) PluralRule + func (p PluralRulerFunc) FindRule(n NumberValue) PluralRule + type Symbols struct + Decimal string + Group string + Negative string + PerMille string + Percent string