Documentation ¶
Index ¶
- func GetTranslator(localeOpt LocaleOption) ut.Translator
- func InitializeTranslator() error
- func Is(source LocaleOption, target LocaleType) bool
- func Register() fiber.Handler
- func T(localeOpt LocaleOption, key string, opts ...TranslateOption) string
- type Config
- type LocaleOption
- type LocaleType
- type TOption
- type TranslateOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeTranslator ¶
func InitializeTranslator() error
func Is ¶
func Is(source LocaleOption, target LocaleType) bool
func T ¶
func T(localeOpt LocaleOption, key string, opts ...TranslateOption) string
translate key with params
Types ¶
type LocaleOption ¶
type LocaleOption func(*Config)
func Locale ¶
func Locale(locale LocaleType) LocaleOption
type LocaleType ¶
type LocaleType string
const ( LocaleEN LocaleType = "en" LocaleZH LocaleType = "zh" )
type TranslateOption ¶
type TranslateOption func(*Config)
func Params ¶
func Params(params ...string) TranslateOption
Click to show internal directories.
Click to hide internal directories.