language.go 292 B

123456789101112131415
  1. package language
  2. import (
  3. "github.com/gofiber/fiber/v2"
  4. "git.dmitriygnatenko.ru/dima/dmitriygnatenko-v2/internal/services/i18n"
  5. )
  6. func New() fiber.Handler {
  7. return func(c *fiber.Ctx) (err error) {
  8. c.Locals(i18n.CtxLanguageKey, i18n.Ru) // now only RU language
  9. return c.Next()
  10. }
  11. }