locales

package
v2.1.2-0...-e76204f Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2020 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Locales = []Locale{
	{
		Tag:  "en",
		Name: "english",
	},
	{
		Tag:  "de",
		Name: "german",
	},
	{
		Tag:  "fr",
		Name: "french",
	},
	{
		Tag:  "es",
		Name: "spanish",
	},
	{
		Tag:  "ca",
		Name: "catalan",
	},
	{
		Tag:  "it",
		Name: "italian",
	},
	{
		Tag:  "tr",
		Name: "turkish",
	},
	{
		Tag:  "nl",
		Name: "dutch",
	},
	{
		Tag:  "el",
		Name: "greek",
	},
	{
		Tag:  "ru",
		Name: "russian",
	},
}

Locales is the list of locales's tags and names Please check if the language is supported in https://github.com/tebeka/snowball, if it is please add the correct language name.

Functions

func Exists

func Exists(tag string) bool

Exists checks if the given tag exists in the list of locales

func GetNameByTag

func GetNameByTag(tag string) string

GetNameByTag returns the name of the given locale's tag

func GetTagByName

func GetTagByName(name string) string

GetTagByName returns the tag of the given locale's name

Types

type Locale

type Locale struct {
	Tag  string
	Name string
}

A Locale is a registered locale in the file

Jump to

Keyboard shortcuts

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