Please use https://github.com/barbashov/iso639-3 instead.
A database of ISO 639-2 and ISO 639-1 languages.
Generated from official ISO 639-2 list, so no native names, unfortunately :(
There's an excellent Go library for ISO 639-1, but it lacks ISO 639-2 codes.
Database is generated (see cmd/generator.go
) from official ISO 639-2 data. See The Library of Congress website for details.
go get github.com/barbashov/iso639-2
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
Feel free to open issues and send pull requests.
MIT