language

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCountryNotFound = errors.New("country not found")
	ErrNoCountryRows   = errors.New("no country row")
)

Functions

This section is empty.

Types

type Alpha2

type Alpha2 string
const (
	Afar              Alpha2 = "aa"
	Abkhazian         Alpha2 = "ab"
	Avestan           Alpha2 = "ae"
	Afrikaans         Alpha2 = "af"
	Akan              Alpha2 = "ak"
	Amharic           Alpha2 = "am"
	Aragonese         Alpha2 = "an"
	Arabic            Alpha2 = "ar"
	Assamese          Alpha2 = "as"
	Avaric            Alpha2 = "av"
	Aymara            Alpha2 = "ay"
	Azerbaijani       Alpha2 = "az"
	Bashkir           Alpha2 = "ba"
	Belarusian        Alpha2 = "be"
	Bulgarian         Alpha2 = "bg"
	BihariLanguages   Alpha2 = "bh"
	Bislama           Alpha2 = "bi"
	Bambara           Alpha2 = "bm"
	Bengali           Alpha2 = "bn"
	Tibetan           Alpha2 = "bo"
	Breton            Alpha2 = "br"
	Bosnian           Alpha2 = "bs"
	Catalan           Alpha2 = "ca"
	Valencian         Alpha2 = "ca"
	Chechen           Alpha2 = "ce"
	Chamorro          Alpha2 = "ch"
	Corsican          Alpha2 = "co"
	Cree              Alpha2 = "cr"
	Czech             Alpha2 = "cs"
	ChurchSlavic      Alpha2 = "cu"
	OldSlavonic       Alpha2 = "cu"
	ChurchSlavonic    Alpha2 = "cu"
	OldBulgarian      Alpha2 = "cu"
	OldChurchSlavonic Alpha2 = "cu"
	Chuvash           Alpha2 = "cv"
	Welsh             Alpha2 = "cy"
	Danish            Alpha2 = "da"
	German            Alpha2 = "de"
	Divehi            Alpha2 = "dv"
	Dhivehi           Alpha2 = "dv"
	Maldivian         Alpha2 = "dv"
	Dzongkha          Alpha2 = "dz"
	Ewe               Alpha2 = "ee"
	Greek             Alpha2 = "el"
	English           Alpha2 = "en"
	Esperanto         Alpha2 = "eo"
	Spanish           Alpha2 = "es"
	Castilian         Alpha2 = "es"
	Estonian          Alpha2 = "et"
	Basque            Alpha2 = "eu"
	Persian           Alpha2 = "fa"
	Fulah             Alpha2 = "ff"
	Finnish           Alpha2 = "fi"
	Fijian            Alpha2 = "fj"
	Faroese           Alpha2 = "fo"
	French            Alpha2 = "fr"
	WesternFrisian    Alpha2 = "fy"
	Irish             Alpha2 = "ga"
	Gaelic            Alpha2 = "gd"
	ScottishGaelic    Alpha2 = "gd"
	Galician          Alpha2 = "gl"
	Guarani           Alpha2 = "gn"
	Gujarati          Alpha2 = "gu"
	Manx              Alpha2 = "gv"
	Hausa             Alpha2 = "ha"
	Hebrew            Alpha2 = "he"
	Hindi             Alpha2 = "hi"
	HiriMotu          Alpha2 = "ho"
	Croatian          Alpha2 = "hr"
	Haitian           Alpha2 = "ht"
	HaitianCreole     Alpha2 = "ht"
	Hungarian         Alpha2 = "hu"
	Armenian          Alpha2 = "hy"
	Herero            Alpha2 = "hz"
	Interlingua       Alpha2 = "ia"
	Indonesian        Alpha2 = "id"
	Interlingue       Alpha2 = "ie"
	Occidental        Alpha2 = "ie"
	Igbo              Alpha2 = "ig"
	SichuanYi         Alpha2 = "ii"
	Nuosu             Alpha2 = "ii"
	Inupiaq           Alpha2 = "ik"
	Ido               Alpha2 = "io"
	Icelandic         Alpha2 = "is"
	Italian           Alpha2 = "it"
	Inuktitut         Alpha2 = "iu"
	Japanese          Alpha2 = "ja"
	Javanese          Alpha2 = "jv"
	Georgian          Alpha2 = "ka"
	Kongo             Alpha2 = "kg"
	Kikuyu            Alpha2 = "ki"
	Gikuyu            Alpha2 = "ki"
	Kuanyama          Alpha2 = "kj"
	Kwanyama          Alpha2 = "kj"
	Kazakh            Alpha2 = "kk"
	Kalaallisut       Alpha2 = "kl"
	Greenlandic       Alpha2 = "kl"
	CentralKhmer      Alpha2 = "km"
	Kannada           Alpha2 = "kn"
	Korean            Alpha2 = "ko"
	Kanuri            Alpha2 = "kr"
	Kashmiri          Alpha2 = "ks"
	Kurdish           Alpha2 = "ku"
	Komi              Alpha2 = "kv"
	Cornish           Alpha2 = "kw"
	Kirghiz           Alpha2 = "ky"

	Latin            Alpha2 = "la"
	Luxembourgish    Alpha2 = "lb"
	Letzeburgesch    Alpha2 = "lb"
	Ganda            Alpha2 = "lg"
	Limburgan        Alpha2 = "li"
	Limburger        Alpha2 = "li"
	Limburgish       Alpha2 = "li"
	Lingala          Alpha2 = "ln"
	Lao              Alpha2 = "lo"
	Lithuanian       Alpha2 = "lt"
	LubaKatanga      Alpha2 = "lu"
	Latvian          Alpha2 = "lv"
	Malagasy         Alpha2 = "mg"
	Marshallese      Alpha2 = "mh"
	Maori            Alpha2 = "mi"
	Macedonian       Alpha2 = "mk"
	Malayalam        Alpha2 = "ml"
	Mongolian        Alpha2 = "mn"
	Marathi          Alpha2 = "mr"
	Malay            Alpha2 = "ms"
	Maltese          Alpha2 = "mt"
	Burmese          Alpha2 = "my"
	Nauru            Alpha2 = "na"
	NorwegianBokmal  Alpha2 = "nb"
	NorthNdebele     Alpha2 = "nd"
	Nepali           Alpha2 = "ne"
	Ndonga           Alpha2 = "ng"
	Dutch            Alpha2 = "nl"
	Flemish          Alpha2 = "nl"
	NorwegianNynorsk Alpha2 = "nn"
	Norwegian        Alpha2 = "no"
	SouthNdebele     Alpha2 = "nr"
	Navajo           Alpha2 = "nv"
	Navaho           Alpha2 = "nv"
	Chichewa         Alpha2 = "ny"
	Chewa            Alpha2 = "ny"
	Nyanja           Alpha2 = "ny"
	Occitan          Alpha2 = "oc"
	Provençal        Alpha2 = "oc"
	Ojibwa           Alpha2 = "oj"
	Oromo            Alpha2 = "om"
	Oriya            Alpha2 = "or"
	Ossetian         Alpha2 = "os"
	Ossetic          Alpha2 = "os"
	Panjabi          Alpha2 = "pa"
	Punjabi          Alpha2 = "pa"
	Pali             Alpha2 = "pi"
	Polish           Alpha2 = "pl"
	Pushto           Alpha2 = "ps"
	Pashto           Alpha2 = "ps"
	Portuguese       Alpha2 = "pt"
	Quechua          Alpha2 = "qu"
	Romansh          Alpha2 = "rm"
	Rundi            Alpha2 = "rn"
	Romanian         Alpha2 = "ro"
	Moldavian        Alpha2 = "ro"
	Moldovan         Alpha2 = "ro"
	Russian          Alpha2 = "ru"
	Kinyarwanda      Alpha2 = "rw"
	Sanskrit         Alpha2 = "sa"
	Sardinian        Alpha2 = "sc"
	Sindhi           Alpha2 = "sd"
	NorthernSami     Alpha2 = "se"
	Sango            Alpha2 = "sg"
	Sinhala          Alpha2 = "si"
	Sinhalese        Alpha2 = "si"
	Slovak           Alpha2 = "sk"
	Slovenian        Alpha2 = "sl"
	Samoan           Alpha2 = "sm"
	Shona            Alpha2 = "sn"
	Somali           Alpha2 = "so"
	Albanian         Alpha2 = "sq"
	Serbian          Alpha2 = "sr"
	Swati            Alpha2 = "ss"
	SouthernSotho    Alpha2 = "st"
	Sundanese        Alpha2 = "su"
	Swedish          Alpha2 = "sv"
	Swahili          Alpha2 = "sw"
	Tamil            Alpha2 = "ta"
	Telugu           Alpha2 = "te"
	Tajik            Alpha2 = "tg"
	Thai             Alpha2 = "th"
	Tigrinya         Alpha2 = "ti"
	Turkmen          Alpha2 = "tk"
	Tagalog          Alpha2 = "tl"
	Tswana           Alpha2 = "tn"
	Tonga            Alpha2 = "to"
	Turkish          Alpha2 = "tr"
	Tsonga           Alpha2 = "ts"
	Tatar            Alpha2 = "tt"
	Twi              Alpha2 = "tw"
	Tahitian         Alpha2 = "ty"
	Uighur           Alpha2 = "ug"
	Uyghur           Alpha2 = "ug"
	Ukrainian        Alpha2 = "uk"
	Urdu             Alpha2 = "ur"
	Uzbek            Alpha2 = "uz"
	Venda            Alpha2 = "ve"
	Vietnamese       Alpha2 = "vi"
	Volapuk          Alpha2 = "vo"
	Walloon          Alpha2 = "wa"
	Wolof            Alpha2 = "wo"
	Xhosa            Alpha2 = "xh"
	Yiddish          Alpha2 = "yi"
	Yoruba           Alpha2 = "yo"
	Zhuang           Alpha2 = "za"
	Chuang           Alpha2 = "za"
	Chinese          Alpha2 = "zh"
	Zulu             Alpha2 = "zu"
)

func (Alpha2) Country

func (alpha2 Alpha2) Country() Language

func (Alpha2) String

func (alpha2 Alpha2) String() string

type Language

type Language struct {
	Name   string `json:"English"`
	Alpha2 string `json:"alpha2"`
	Alpha3 string `json:"alpha3-b"`
}

func Find

func Find(query string) (*Language, error)

type Languages

type Languages []Language

func List

func List() (Languages, error)

Jump to

Keyboard shortcuts

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