i18n

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultLang = "en"

Variables

This section is empty.

Functions

func Lang added in v0.6.0

func Lang(c *fiber.Ctx) string

func RegisterTranslations

func RegisterTranslations(embed embed.FS, location string)

Types

type TranslationsData added in v0.6.0

type TranslationsData map[string]TranslationsT

func Translations added in v0.6.0

func Translations() TranslationsData

func (TranslationsData) Language added in v0.6.0

func (t TranslationsData) Language(lang string) TranslationsT

func (TranslationsData) WithCtx added in v0.6.0

func (t TranslationsData) WithCtx(c *fiber.Ctx) TranslationsT

type TranslationsT added in v0.6.0

type TranslationsT map[string]string

func L added in v0.1.0

func L(c *fiber.Ctx) TranslationsT

Shorter forms

func WithCtx added in v0.6.0

func WithCtx(c *fiber.Ctx) TranslationsT

func (TranslationsT) T added in v0.6.0

func (t TranslationsT) T(msg string) string

func (TranslationsT) Translate added in v0.6.0

func (t TranslationsT) Translate(msg string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL