Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapURL ¶
func MapURL(from, to string)
MapURL allows predefining a specific short URL for a long URL can be used to define vanity URLs for example
func Translate ¶
func Translate(localizations []interfaces.Localization, key string, values ...interface{}) string
Translate translates a given key for the event
Types ¶
type FileSource ¶
type FileSource struct {
// contains filtered or unexported fields
}
FileSource is a localization source from a toml file
func NewFileSource ¶
func NewFileSource(path, language string) (*FileSource, error)
NewFileSource creates a new FileSource
func (*FileSource) Language ¶
func (l *FileSource) Language() string
Language returns the language of the localizations
func (*FileSource) Translate ¶
func (l *FileSource) Translate(key string) string
Translate translates a given key
func (*FileSource) TranslateMap ¶
func (l *FileSource) TranslateMap(key string, values map[interface{}]interface{}) string
TranslateMap translates a given key with the given values
func (*FileSource) Translatef ¶
func (l *FileSource) Translatef(key string, fields ...interface{}) string
Translate translates a given key with the given fields
Click to show internal directories.
Click to hide internal directories.