The isolang
package provides a set of constants representing ISO 639-1 language codes in Go.
To install the isolang
package, use go get
:
go get github.com/rostis232/isolang
Import the isolang package in your Go code:
import (
"fmt"
"github.com/your-username/isolang"
)
func main() {
// Example usage
lang := isolang.English
fmt.Println("Language code for English:", lang)
}
The package defines the following ISO 639-1 language codes as constants:
Afrikaans (af) Albanian (sq) Amharic (am) Arabic (ar) Armenian (hy) Azerbaijani (az) Basque (eu) Belarusian (be) Bengali (bn) Bosnian (bs) Bulgarian (bg) Catalan (ca) Chinese (zh) Croatian (hr) Czech (cs) Danish (da) Dutch (nl) English (en) Esperanto (eo) Estonian (et) Finnish (fi) French (fr) Georgian (ka) German (de) Greek (el) Gujarati (gu) Hebrew (he) Hindi (hi) Hungarian (hu) Icelandic (is) Indonesian (id) Irish (ga) Italian (it) Japanese (ja) Kannada (kn) Kazakh (kk) Korean (ko) Kurdish (ku) Lao (lo) Latvian (lv) Lithuanian (lt) Macedonian (mk) Malay (ms) Malayalam (ml) Maltese (mt) Marathi (mr) Mongolian (mn) Nepali (ne) Norwegian (no) Pashto (ps) Persian (fa) Polish (pl) Portuguese (pt) Punjabi (pa) Romanian (ro) Russian (ru) Serbian (sr) Sinhala (si) Slovak (sk) Slovenian (sl) Somali (so) Spanish (es) Swahili (sw) Swedish (sv) Tamil (ta) Telugu (te) Thai (th) Turkish (tr) Ukrainian (uk) Urdu (ur) Uzbek (uz) Vietnamese (vi) Welsh (cy) Xhosa (xh) Yoruba (yo) Zulu (zu)
For more details on each language code, refer to the ISO 639-1 standard.
This project is licensed under the MIT License - see the LICENSE file for details.
Feel free to adjust and expand on this template according to your specific needs or additional features of the package!