MCPcopy Index your code
hub / github.com/cloudfoundry/cli / IsSupportedLocale

Function IsSupportedLocale

cf/i18n/locale.go:35–48  ·  view source on GitHub ↗
(locale string)

Source from the content-addressed store, hash-verified

33}
34
35func 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
50func supportedLanguages() []string {
51 assetNames := resources.AssetNames()

Callers 2

locale_test.goFile · 0.92
ExecuteMethod · 0.85

Calls 2

ParseLocaleFunction · 0.92
supportedLanguagesFunction · 0.85

Tested by

no test coverage detected