language.go 430 B

1234567891011121314151617181920212223242526
  1. package storage
  2. type Language struct {
  3. Code string
  4. Native string
  5. }
  6. var languageMap map[string]string = map[string]string{
  7. "de": "Deutsch",
  8. "eo": "Esperanto",
  9. "en": "English",
  10. "fr": "Français",
  11. }
  12. var Languages map[string]Language
  13. func init() {
  14. Languages = make(map[string]Language, len(languageMap))
  15. for code, native := range languageMap {
  16. Languages[code] = Language{
  17. Code: code,
  18. Native: native,
  19. }
  20. }
  21. }