i18n

package
v0.0.0-...-3ba4ce3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTemplate

func GetTemplate(lang string, name string) *template.Template

GetTemplate is used to fetch a translation

func GetTranslator

func GetTranslator(language string) func(name string, params interface{}) string

GetTranslator returns a translator bound to a language

func LoadTranslations

func LoadTranslations()

LoadTranslations loads the translations

func RegisterLocale

func RegisterLocale(lang string, register TranslationConfig)

RegisterLocale registers a possible locale in the server

Types

type Translation

type Translation map[string]*template.Template

Translation translates all the things

type TranslationConfig

type TranslationConfig map[string]string

TranslationConfig is used to initalize a translation

Jump to

Keyboard shortcuts

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