Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentityFunc ¶
Types ¶
type I18nBundle ¶
func NewI18nBundle ¶
func NewI18nBundle(box statics.FS) *I18nBundle
NewI18nBundle creates a usable I18nBundle
func (*I18nBundle) LoadBoxTranslationFiles ¶
func (b *I18nBundle) LoadBoxTranslationFiles(box statics.FS)
LoadBoxTranslationFiles loads goi18n translation files from boxes
func (*I18nBundle) T ¶
func (b *I18nBundle) T(languages ...string) TranslateFunc
T provides the correct translation func for language or the IdentityFunc if language is not supported. Languages can be a list of weighted languages as provided in the http header Accept-Language
type TranslateFunc ¶
Click to show internal directories.
Click to hide internal directories.