Files
opencloud/vendor/github.com/emvi/iso-639-1
Jörn Friedrich Dreyer 5ed57cc09a Bump reva deps (#8412)
* bump dependencies

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* bump reva and add config options

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-21 10:20:36 +01:00
..
2023-04-19 20:24:34 +02:00
2024-02-21 10:20:36 +01:00
2023-04-19 20:24:34 +02:00
2023-04-19 20:24:34 +02:00
2023-04-19 20:24:34 +02:00
2023-04-19 20:24:34 +02:00
2024-02-21 10:20:36 +01:00
2023-04-19 20:24:34 +02:00

ISO 639-1

Go Reference CircleCI Go Report Card Chat on Discord

List of all ISO 639-1 language names, native names and two character codes as well as functions for convenient access. The lists of all names and codes (Codes, Names, NativeNames, Languages) are build in the init function for quick read access. For full documentation please read the Godocs.

Installation

go get github.com/emvi/iso-639-1

Example

fmt.Println(iso6391.Codes)          // print all codes
fmt.Println(iso6391.Names)          // print all names
fmt.Println(iso6391.NativeNames)    // print all native names
fmt.Println(iso6391.Languages)      // print all language objects {Code, Name, NativeName}

fmt.Println(iso6391.FromCode("en"))             // prints {Code: "en", Name: "English", NativeName: "English"}
fmt.Println(iso6391.Name("en"))                 // prints "English"
fmt.Println(iso6391.NativeName("zh"))           // prints "中文"
fmt.Println(iso6391.CodeFromName("English"))    // prints "en"
fmt.Println(iso6391.ValidCode("en"))            // prints true
// ... see Godoc for more functions

Contribute

See CONTRIBUTING.md

License

MIT