localization

package
v0.0.0-...-da9a50a Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTranslations

func InitTranslations() error

InitTranslations loads files with translation according to array in config file. Needs to run in the server main.go. err!=nil means that one of them can't be opened

func LocalizeMessage

func LocalizeMessage(acceptLanguage string, message *string, key string)

LocalizeMessage translates messages. acceptLanguage - Accept-Languages from request header (r.Header.Get("Accept-Language"))

Types

This section is empty.

Jump to

Keyboard shortcuts

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