Documentation ¶
Index ¶
- func ApplyFormatting(text string, formatting map[string]string) string
- func ApplyNumbers(str string, num interface{}) string
- func GetContextData(data *options.DataOptions, context map[string]string) *options.ContextOptions
- func UseOriginalText(text string, num interface{}, formatting map[string]string) string
- type Translator
- func (translator *Translator) Add(data *options.DataOptions)
- func (translator *Translator) ClearContext(key string)
- func (translator *Translator) Extend(...)
- func (translator *Translator) FindTranslation(text string, num interface{}, formatting map[string]string, ...) (string, bool)
- func (translator *Translator) Reset()
- func (translator *Translator) ResetContext()
- func (translator *Translator) ResetData()
- func (translator *Translator) SetContext(key string, value string)
- func (translator *Translator) Translate(text string, input ...interface{}) string
- func (translator *Translator) TranslateText(text string, num interface{}, formatting map[string]string, ...) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyNumbers ¶
func GetContextData ¶
func GetContextData(data *options.DataOptions, context map[string]string) *options.ContextOptions
Types ¶
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
func CreateTranslator ¶
func CreateTranslator(data *options.DataOptions) *Translator
func (*Translator) Add ¶
func (translator *Translator) Add(data *options.DataOptions)
func (*Translator) ClearContext ¶
func (translator *Translator) ClearContext(key string)
func (*Translator) FindTranslation ¶
func (*Translator) Reset ¶
func (translator *Translator) Reset()
func (*Translator) ResetContext ¶
func (translator *Translator) ResetContext()
func (*Translator) ResetData ¶
func (translator *Translator) ResetData()
func (*Translator) SetContext ¶
func (translator *Translator) SetContext(key string, value string)
func (*Translator) Translate ¶
func (translator *Translator) Translate( text string, input ...interface{}, ) string
func (*Translator) TranslateText ¶
Click to show internal directories.
Click to hide internal directories.