• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License
15  */
16 
17 package com.android.inputmethod.leanback;
18 
19 import java.util.Locale;
20 
21 public class LeanbackLocales {
22 
23     /*
24      * -Locales are organized into groups based on keyboard layout (e.g. qwerty, qwertz, azerty)
25      * -In each group, the most specific layouts (those that specify language AND country)
26      *  are listed first
27      * -The list of locales are named as such: <keyboard layout>_<country|language>_zone
28      *   (Note: the naming of the list is made as generic as possible, for example if there is only
29      *    one list for a given keyboard layout then the country, language and zone is omitted)
30      *   (Note: country is preferred over language because it is more specific, if no country is
31      *    specified, use language)
32      *   (Note: zone refers to US vs EU, which specifies which type of currency to use
33      *    dollar, euro, or pound)
34      */
35 
36     /**************************** QWERTY ****************************/
37     // QWERTY (EN GB)
38     public static final Locale BRITISH_ENGLISH = new Locale("en", "GB");
39     public static final Locale[] QWERTY_GB = new Locale[] {BRITISH_ENGLISH};
40 
41     // QWERTY (EN IN)
42     public static final Locale INDIAN_ENGLISH = new Locale("en", "IN");
43     public static final Locale[] QWERTY_IN = new Locale[] {INDIAN_ENGLISH};
44 
45     // QWERTY (ES EU)
46     public static final Locale SPAIN_SPANISH = new Locale("es", "ES");
47     public static final Locale GALIC_SPANISH = new Locale("gl", "ES");
48     public static final Locale BASQUE_SPANISH = new Locale("eu", "ES");
49     public static final Locale[] QWERTY_ES_EU = new Locale[] {
50         SPAIN_SPANISH, GALIC_SPANISH, BASQUE_SPANISH};
51 
52     // QWERTY (ES US)
53     public static final Locale OTHER_SPANISH = new Locale("es", "");
54     public static final Locale[] QWERTY_ES_US = new Locale[] {OTHER_SPANISH};
55 
56     // QWERTY (AZ)
57     public static final Locale AZERBAIJANI = new Locale("az", "");
58     public static final Locale[] QWERTY_AZ = new Locale[] {AZERBAIJANI};
59 
60     // QWERTY (CA)
61     public static final Locale CATALAN = new Locale("ca", "");
62     public static final Locale[] QWERTY_CA = new Locale[] {CATALAN};
63 
64     // QWERTY (DA)
65     public static final Locale DANISH = new Locale("da", "");
66     public static final Locale[] QWERTY_DA = new Locale[] {DANISH};
67 
68     // QWERTY (ET)
69     public static final Locale ESTONIAN = new Locale("et", "");
70     public static final Locale[] QWERTY_ET = new Locale[] {ESTONIAN};
71 
72     // QWERTY (FI)
73     public static final Locale FINNISH = new Locale("fi", "");
74     public static final Locale[] QWERTY_FI = new Locale[] {FINNISH};
75 
76     // QWERTY (NB)
77     public static final Locale NORWEGIAN = new Locale("nb", "");
78     public static final Locale[] QWERTY_NB = new Locale[] {NORWEGIAN};
79 
80     // QWERTY (SV)
81     public static final Locale SWEDISH = new Locale("sv", "");
82     public static final Locale[] QWERTY_SV = new Locale[] {SWEDISH};
83 
84     // QWERTY (US)
85     public static final Locale ENGLISH = Locale.ENGLISH;
86     public static final Locale CANADIAN_FRENCH = Locale.CANADA_FRENCH;
87     public static final Locale[] QWERTY_US = new Locale[] {ENGLISH, CANADIAN_FRENCH};
88 
89 
90     /**************************** QWERTZ ****************************/
91 
92     // QWERTZ (CH)
93     public static final Locale SWISS_GERMAN = new Locale("de", "CH");
94     public static final Locale SWISS_ITALIAN = new Locale("it", "CH");
95     public static final Locale[] QWERTZ_CH = new Locale[] { SWISS_GERMAN, SWISS_ITALIAN};
96 
97     // QWERTZ
98     public static final Locale GERMAN = new Locale("de", "");
99     public static final Locale CROATIAN = new Locale("hr", "");
100     public static final Locale CZECH = new Locale("cs", "");
101     public static final Locale SWISS_FRENCH = new Locale("fr", "CH");
102     public static final Locale HUNGARIAN = new Locale("hu", "");
103     public static final Locale SERBIAN = new Locale("sr", "");
104     public static final Locale SLOVENIAN = new Locale("sl", "");
105     public static final Locale ALBANIANIAN = new Locale("sq", "");
106     public static final Locale[] QWERTZ = new Locale[] { GERMAN, CROATIAN, CZECH, SWISS_FRENCH,
107         SWISS_ITALIAN, HUNGARIAN,SERBIAN, SLOVENIAN, ALBANIANIAN};
108 
109 
110     /**************************** AZERTY ****************************/
111 
112     // AZERTY
113     public static final Locale FRENCH = Locale.FRENCH;
114     public static final Locale BELGIAN_DUTCH = new Locale("nl", "BE");
115     public static final Locale[] AZERTY = new Locale[] {FRENCH, BELGIAN_DUTCH};
116 
117 }
118