(locale string)
| 33 | } |
| 34 | |
| 35 | func IsSupportedLocale(locale string) bool { |
| 36 | sanitizedLocale, err := ui.ParseLocale(locale) |
| 37 | if err != nil { |
| 38 | return false |
| 39 | } |
| 40 | |
| 41 | for _, supportedLanguage := range supportedLanguages() { |
| 42 | if supportedLanguage == sanitizedLocale { |
| 43 | return true |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | return false |
| 48 | } |
| 49 | |
| 50 | func supportedLanguages() []string { |
| 51 | assetNames := resources.AssetNames() |
no test coverage detected