i18n

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 License: MIT Imports: 4 Imported by: 0

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

func Get(key string) string

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

func SupportedLangs() map[string]string

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.

Jump to

Keyboard shortcuts

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