Skip to content

barbashov/iso639-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

Please use https://github.com/barbashov/iso639-3 instead.

ISO 639-2

Go Reference Test Go Report Card

A database of ISO 639-2 and ISO 639-1 languages.

Generated from official ISO 639-2 list, so no native names, unfortunately :(

Motivation

There's an excellent Go library for ISO 639-1, but it lacks ISO 639-2 codes.

Data source

Database is generated (see cmd/generator.go) from official ISO 639-2 data. See The Library of Congress website for details.

Installation

go get github.com/barbashov/iso639-2

Examples

iso639_2.Languages // returns languages lookup table

iso639_2.FromCode("eng") // returns object representing English language
iso639_2.FromEnglishName("English") // returns object representing English language
iso639_2.FromFrenchName("anglais") // returns object representing English language

Contribute

Feel free to open issues and send pull requests.

License

MIT

About

ISO 639-2 database for Go

Resources

License

Stars

Watchers

Forks

Languages