Documentation
¶
Overview ¶
Package i18n provides internationalization for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶ added in v1.0.0
Get returns translated string by key for the initial language. If the key does not exist, it returns the key. It must be called after `Init` was called at least once.
func Init ¶ added in v1.0.0
func Init(lang string)
Init initializes internationalization with the language. It must be called at least once before `Get` is called. This method is concurrent safe.
func SupportedLangs ¶ added in v1.0.0
SupportedLangs returns a map of currently supported languages. Keys of the returned map are the language codes, and values are human-readable names of the languages.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.