translation

package
v1.14.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLocales

func InitLocales()

InitLocales loads the locales

func Match

func Match(tags ...language.Tag) (tag language.Tag, index int, c language.Confidence)

Match matches accept languages

Types

type LangType

type LangType struct {
	Lang, Name string
}

LangType represents a lang type

func AllLangs

func AllLangs() []LangType

AllLangs returns all supported langauages

type Locale

type Locale interface {
	Language() string
	Tr(string, ...interface{}) string
}

Locale represents an interface to translation

func NewLocale

func NewLocale(lang string) Locale

NewLocale return a locale

Jump to

Keyboard shortcuts

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