Documentation ¶
Index ¶
- type DateTimeFormatter
- func (dtf *DateTimeFormatter) Format(format string) string
- func (dtf *DateTimeFormatter) FormatDate() string
- func (dtf *DateTimeFormatter) FormatDateTime() string
- func (dtf *DateTimeFormatter) FormatLocale(format string) string
- func (dtf *DateTimeFormatter) FormatTime() string
- func (dtf *DateTimeFormatter) FormatToLocalDate() string
- func (dtf *DateTimeFormatter) FormatToLocalDateTime() string
- func (dtf *DateTimeFormatter) FormatToLocalTime() string
- func (dtf *DateTimeFormatter) SetDateTime(time time.Time, localtime time.Time)
- type Label
- func (l *Label) AddFallbackLocale(localeCode string) *Label
- func (l *Label) GetCount() int
- func (l *Label) GetDefaultLabel() string
- func (l *Label) GetFallbacklocaleCodes() []string
- func (l *Label) GetKey() string
- func (l *Label) GetLocaleCode() string
- func (l *Label) GetTranslationArguments() map[string]interface{}
- func (l *Label) Inject(translationService TranslationService)
- func (l Label) MarshalJSON() ([]byte, error)
- func (l *Label) NoFallbackLocales() *Label
- func (l *Label) SetCount(count int) *Label
- func (l *Label) SetDefaultLabel(defaultLabel string) *Label
- func (l *Label) SetFallbackLocales(fallbackLocaleCodes []string) *Label
- func (l *Label) SetKey(key string) *Label
- func (l *Label) SetLocale(localeCode string) *Label
- func (l *Label) SetTranslationArguments(translationArguments map[string]interface{}) *Label
- func (l Label) String() string
- type TranslationService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateTimeFormatter ¶
type DateTimeFormatter struct { DateFormat string TimeFormat string DateTimeFormat string // contains filtered or unexported fields }
DateTimeFormatter has a couple of helpful methods to format date and times
func (*DateTimeFormatter) Format ¶
func (dtf *DateTimeFormatter) Format(format string) string
Format datetime
func (*DateTimeFormatter) FormatDate ¶
func (dtf *DateTimeFormatter) FormatDate() string
FormatDate formats the date
func (*DateTimeFormatter) FormatDateTime ¶
func (dtf *DateTimeFormatter) FormatDateTime() string
FormatDateTime formats both date and time
func (*DateTimeFormatter) FormatLocale ¶
func (dtf *DateTimeFormatter) FormatLocale(format string) string
FormatLocale formats the local time
func (*DateTimeFormatter) FormatTime ¶
func (dtf *DateTimeFormatter) FormatTime() string
FormatTime formats the time
func (*DateTimeFormatter) FormatToLocalDate ¶
func (dtf *DateTimeFormatter) FormatToLocalDate() string
FormatToLocalDate formats for local date
func (*DateTimeFormatter) FormatToLocalDateTime ¶
func (dtf *DateTimeFormatter) FormatToLocalDateTime() string
FormatToLocalDateTime formats both locale date and time
func (*DateTimeFormatter) FormatToLocalTime ¶
func (dtf *DateTimeFormatter) FormatToLocalTime() string
FormatToLocalTime formats the local time
func (*DateTimeFormatter) SetDateTime ¶
func (dtf *DateTimeFormatter) SetDateTime(time time.Time, localtime time.Time)
SetDateTime setter for private member
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
Label instance
func (*Label) AddFallbackLocale ¶
AddFallbackLocale on a label
func (*Label) GetFallbacklocaleCodes ¶
GetFallbacklocaleCodes for label
func (*Label) GetTranslationArguments ¶
GetTranslationArguments for label
func (*Label) Inject ¶
func (l *Label) Inject(translationService TranslationService)
Inject translation service
func (Label) MarshalJSON ¶
MarshalJSON implements fmt.Stringer - pinning to the non pointer by intent
func (*Label) NoFallbackLocales ¶
NoFallbackLocales on a label - removes any fallback locale codes
func (*Label) SetDefaultLabel ¶
SetDefaultLabel on a label
func (*Label) SetFallbackLocales ¶
SetFallbackLocales on a label
func (*Label) SetTranslationArguments ¶
SetTranslationArguments sets the argument map