Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalizationService ¶
type LocalizationService struct {
// contains filtered or unexported fields
}
func NewLocalizationService ¶
func NewLocalizationService() *LocalizationService
func (*LocalizationService) GetLocalizer ¶
func (ls *LocalizationService) GetLocalizer(lang string) *i18n.Localizer
func (*LocalizationService) GetLocalizerFromRequest ¶
func (ls *LocalizationService) GetLocalizerFromRequest(r *http.Request) *i18n.Localizer
type SimpleLocalizer ¶
SimpleLocalizer wraps i18n.Localizer with a more convenient API
func GetLocalizer ¶
func GetLocalizer(r *http.Request) *SimpleLocalizer
GetLocalizer creates a localizer based on the request's Accept-Language header or forcedLanguage option
func (*SimpleLocalizer) GetLang ¶
func (sl *SimpleLocalizer) GetLang() string
Get the language that is used by the localizer by retrieving a well-known string that is required to be present
func (*SimpleLocalizer) T ¶
func (sl *SimpleLocalizer) T(messageID string) string
T provides a concise way to localize messages
Click to show internal directories.
Click to hide internal directories.