Documentation ¶
Index ¶
- Variables
- func RegisterRules(lang string, rule Rule)
- func RegisterTranslations(lang string, trans map[string]string, rule ...Rule)
- func Set(paramName string, value string) error
- func Take(datetime string, langs ...string) string
- func Timestamp(timestamp int64, langAndOptions ...string) string
- type Detector
- type Rule
- type Translations
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTimeFormat = "2006-01-02 15:04:05"
View Source
var ErrUnsupported = errors.New(`Unsupported`)
Functions ¶
func RegisterRules ¶ added in v1.2.0
func RegisterTranslations ¶
func Set ¶
Set sets configurations parameters to given value paramName is the name of the parameter, can be `language` or `location`. Seconds parameter is value of the configuration. For parameter `language` can be `ru` or `en`
Types ¶
type Translations ¶
type Translations struct {
// contains filtered or unexported fields
}
func NewTranslations ¶
func NewTranslations(source map[string]string) *Translations
func (*Translations) T ¶
func (t *Translations) T(key string) string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.