forked from arienmalec/alexa-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlocale.go
38 lines (29 loc) · 991 Bytes
/
locale.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package alexa
// locales
const (
// LocaleItalian is the locale for Italian
LocaleItalian = "it-IT"
// LocaleGerman is the locale for standard dialect German
LocaleGerman = "de-DE"
// LocaleAustralianEnglish is the locale for Australian English
LocaleAustralianEnglish = "en-AU"
//LocaleCanadianEnglish is the locale for Canadian English
LocaleCanadianEnglish = "en-CA"
//LocaleBritishEnglish is the locale for UK English
LocaleBritishEnglish = "en-GB"
//LocaleIndianEnglish is the locale for Indian English
LocaleIndianEnglish = "en-IN"
//LocaleAmericanEnglish is the locale for American English
LocaleAmericanEnglish = "en-US"
// LocaleJapanese is the locale for Japanese
LocaleJapanese = "ja-JP"
)
// IsEnglish returns true if locale is English
func IsEnglish(locale string) bool {
switch locale {
case LocaleAmericanEnglish, LocaleIndianEnglish, LocaleBritishEnglish, LocaleCanadianEnglish, LocaleAustralianEnglish:
return true
default:
return false
}
}