Documentation
¶
Overview ¶
Code generated by gen/main.go; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Translator ¶
type Translator interface {
// WeekdaysWide returns the full names of the week days, starting with Sunday.
WeekdaysWide() []string
// WeekdaysAbbreviated returns the abbreviated names of the week days, starting with Sunday.
WeekdaysAbbreviated() []string
// MonthsWide returns the full names of the months, starting with January.
MonthsWide() []string
// MonthsAbbreviated returns the abbreviated names of the months, starting with January.
MonthsAbbreviated() []string
// FormatDateFull formats the given time using the full date pattern for the locale.
FormatDateFull(t time.Time) string
// FormatDateLong formats the given time using the long date pattern for the locale.
FormatDateLong(t time.Time) string
// FormatDateMedium formats the given time using the medium date pattern for the locale.
FormatDateMedium(t time.Time) string
// FormatDateShort formats the given time using the short date pattern for the locale.
FormatDateShort(t time.Time) string
// FormatTimeFull formats the given time using the full time pattern for the locale.
FormatTimeFull(t time.Time) string
// FormatTimeLong formats the given time using the long time pattern for the locale.
FormatTimeLong(t time.Time) string
// FormatTimeMedium formats the given time using the medium time pattern for the locale.
FormatTimeMedium(t time.Time) string
// FormatTimeShort formats the given time using the short time pattern for the locale.
FormatTimeShort(t time.Time) string
// FormatNumber formats the given number with the specified number of decimal places.
FormatNumber(num float64, p int) string
// FormatAccounting formats the given number as an accounting value with the specified number of decimal places and currency.
FormatAccounting(num float64, p int, currency string) string
// FormatPercent formats the given number as a percentage with the specified number of decimal places.
FormatPercent(num float64, p int) string
// FormatCurrency formats the given number as a currency value with the specified number of decimal places and currency.
FormatCurrency(num float64, p int, currency string) string
}
func New ¶
func New(locale string) Translator
New returns a new Translator for the given locale, or nil if the locale is not supported.
Click to show internal directories.
Click to hide internal directories.