Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetLocalizer ¶
func SetLocalizer(l Localizer)
SetLocalizer sets the global Localizer to the provided implementation.
Types ¶
type Localizer ¶
type Localizer interface {
// NewTranslator returns a Translator for the specified language.
NewTranslator(lang string) Translator
// GetDefaultLanguage returns the default language setting.
GetDefaultLanguage() string
// GetAvailableLanguages returns a list of available languages.
GetAvailableLanguages() []string
}
Localizer defines the methods required for language localization.
func GetLocalizer ¶
func GetLocalizer() Localizer
GetLocalizer returns the current global Localizer instance.
type Translator ¶
Translator is a function type that translates a given string to another language.
Click to show internal directories.
Click to hide internal directories.