Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { DefaultLanguage string `env:"RB_I18N_DEFAULT_LANGUAGE" envDefault:"en-US"` Dir string `env:"RB_I18N_DIR"` FileNames []string `env:"RB_I18N_FILE_NAMES" envSeparator:":"` }
Conf configures the i18n setup
type MessageFiles ¶
MessageFiles are translations files on a filesystem
func FromDir ¶
func FromDir(logs *zap.Logger, cfg Conf) MessageFiles
FromDir provides translation files from an actual directory
func FromEmbed ¶
func FromEmbed(efs embed.FS) MessageFiles
FromEmbed creates a translation message files fs from an embedded filesystem
type Params ¶
type Params struct { fx.In Files MessageFiles }
Params are parameters for the bundle constructor
Click to show internal directories.
Click to hide internal directories.