package main type Language int func (l Language) String() string { switch l { case English: return "english" case Italian: return "italian" case Portuguese: return "portuguese" case Spanish: return "spanish" } panic("unreachable") } const ( English = Language(iota) Italian Portuguese Spanish ) // See: https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes var Languages = map[string]Language{ "EN": English, "IT": Italian, "PT": Portuguese, "ES": Spanish, } var Introduction = map[Language]string { English: "Hello! Welcome to Lingua!", Italian: "Salve! Benvenuti a Lingua!", } var SelectNewsSource = map[Language]string { English: "Select a New Source", Italian: "Seleziona un canale", } var SummarizeText = map[Language]string { English: "Summarize the text above into %s", Italian: "Riassumi il testo seguente in %s", } var ScoreText = map[Language]string { English: "Your score was: %d", Italian: "La tua valutazione รจ stata: %d", }