FreeRDP
locale.h
1 
20 /* Detection of plausible keyboard layout id based on current locale (LANG) setting. */
21 
22 /*
23  * Refer to "Windows XP/Server 2003 - List of Locale IDs, Input Locale, and Language Collection":
24  * http://www.microsoft.com/globaldev/reference/winxp/xp-lcid.mspx
25  */
26 
27 #ifndef FREERDP_LOCALE_H
28 #define FREERDP_LOCALE_H
29 
30 #include <freerdp/api.h>
31 #include <freerdp/types.h>
32 
36 #define AFRIKAANS 0x0436
37 #define ALBANIAN 0x041C
38 #define ALSATIAN 0x0484
39 #define AMHARIC 0x045E
40 #define ARABIC_SAUDI_ARABIA 0x0401
41 #define ARABIC_IRAQ 0x0801
42 #define ARABIC_EGYPT 0x0C01
43 #define ARABIC_LIBYA 0x1001
44 #define ARABIC_ALGERIA 0x1401
45 #define ARABIC_MOROCCO 0x1801
46 #define ARABIC_TUNISIA 0x1C01
47 #define ARABIC_OMAN 0x2001
48 #define ARABIC_YEMEN 0x2401
49 #define ARABIC_SYRIA 0x2801
50 #define ARABIC_JORDAN 0x2C01
51 #define ARABIC_LEBANON 0x3001
52 #define ARABIC_KUWAIT 0x3401
53 #define ARABIC_UAE 0x3801
54 #define ARABIC_BAHRAIN 0x3C01
55 #define ARABIC_QATAR 0x4001
56 #define ARMENIAN 0x042B
57 #define ASSAMESE 0x044D
58 #define AZERI_LATIN 0x042C
59 #define AZERI_CYRILLIC 0x082C
60 #define BASHKIR 0x046D
61 #define BASQUE 0x042D
62 #define BELARUSIAN 0x0423
63 #define BENGALI_INDIA 0x0445
64 #define BOSNIAN_LATIN 0x141A
65 #define BRETON 0x047E
66 #define BULGARIAN 0x0402
67 #define CATALAN 0x0403
68 #define CHEROKEE 0x045C
69 #define CHINESE_TAIWAN 0x0404
70 #define CHINESE_PRC 0x0804
71 #define CHINESE_HONG_KONG 0x0C04
72 #define CHINESE_SINGAPORE 0x1004
73 #define CHINESE_MACAU 0x1404
74 #define CROATIAN 0x041A
75 #define CROATIAN_BOSNIA_HERZEGOVINA 0x101A
76 #define CZECH 0x0405
77 #define DANISH 0x0406
78 #define DARI 0x048C
79 #define DIVEHI 0x0465
80 #define DUTCH_STANDARD 0x0413
81 #define DUTCH_BELGIAN 0x0813
82 #define ENGLISH_UNITED_STATES 0x0409
83 #define ENGLISH_UNITED_KINGDOM 0x0809
84 #define ENGLISH_AUSTRALIAN 0x0C09
85 #define ENGLISH_CANADIAN 0x1009
86 #define ENGLISH_NEW_ZEALAND 0x1409
87 #define ENGLISH_INDIA 0x4009
88 #define ENGLISH_IRELAND 0x1809
89 #define ENGLISH_MALAYSIA 0x4409
90 #define ENGLISH_SOUTH_AFRICA 0x1C09
91 #define ENGLISH_JAMAICA 0x2009
92 #define ENGLISH_CARIBBEAN 0x2409
93 #define ENGLISH_BELIZE 0x2809
94 #define ENGLISH_TRINIDAD 0x2C09
95 #define ENGLISH_ZIMBABWE 0x3009
96 #define ENGLISH_PHILIPPINES 0x3409
97 #define ENGLISH_SINGAPORE 0x4809
98 #define ESTONIAN 0x0425
99 #define FAEROESE 0x0438
100 #define FARSI 0x0429
101 #define FILIPINO 0x0464
102 #define FINNISH 0x040B
103 #define FRENCH_STANDARD 0x040C
104 #define FRENCH_BELGIAN 0x080C
105 #define FRENCH_CANADIAN 0x0C0C
106 #define FRENCH_SWISS 0x100C
107 #define FRENCH_LUXEMBOURG 0x140C
108 #define FRENCH_MONACO 0x180C
109 #define FRISIAN 0x0462
110 #define GEORGIAN 0x0437
111 #define GALICIAN 0x0456
112 #define GERMAN_STANDARD 0x0407
113 #define GERMAN_SWISS 0x0807
114 #define GERMAN_AUSTRIAN 0x0C07
115 #define GERMAN_LUXEMBOURG 0x1007
116 #define GERMAN_LIECHTENSTEIN 0x1407
117 #define GREEK 0x0408
118 #define GREENLANDIC 0x046F
119 #define GUJARATI 0x0447
120 #define HAWAIIAN 0x0475
121 #define HEBREW 0x040D
122 #define HINDI 0x0439
123 #define HUNGARIAN 0x040E
124 #define ICELANDIC 0x040F
125 #define IGBO 0x0470
126 #define INDONESIAN 0x0421
127 #define INUKTITUT 0x045D
128 #define IRISH 0x083C
129 #define ITALIAN_STANDARD 0x0410
130 #define ITALIAN_SWISS 0x0810
131 #define JAPANESE 0x0411
132 #define KANNADA 0x044B
133 #define KAZAKH 0x043F
134 #define KHMER 0x0453
135 #define KICHE 0x0486
136 #define KINYARWANDA 0x0487
137 #define KONKANI 0x0457
138 #define KOREAN 0x0412
139 #define KYRGYZ 0x0440
140 #define LAO 0x0454
141 #define LATVIAN 0x0426
142 #define LITHUANIAN 0x0427
143 #define LOWER_SORBIAN 0x082E
144 #define LUXEMBOURGISH 0x046E
145 #define MACEDONIAN 0x042F
146 #define MALAY_MALAYSIA 0x043E
147 #define MALAY_BRUNEI_DARUSSALAM 0x083E
148 #define MALAYALAM 0x044C
149 #define MALTESE 0x043A
150 #define MAPUDUNGUN 0x047A
151 #define MAORI 0x0481
152 #define MARATHI 0x044E
153 #define MOHAWK 0x047C
154 #define MONGOLIAN 0x0450
155 #define MYANMAR 0x0455
156 #define NEPALI 0x0461
157 #define NORWEGIAN_BOKMAL 0x0414
158 #define NORWEGIAN_NYNORSK 0x0814
159 #define OCCITAN 0x0482
160 #define ORIYA 0x0448
161 #define PASHTO 0x0463
162 #define POLISH 0x0415
163 #define PORTUGUESE_BRAZILIAN 0x0416
164 #define PORTUGUESE_STANDARD 0x0816
165 #define PUNJABI 0x0446
166 #define QUECHUA_BOLIVIA 0x046B
167 #define QUECHUA_ECUADOR 0x086B
168 #define QUECHUA_PERU 0x0C6B
169 #define ROMANIAN 0x0418
170 #define ROMANSH 0x0417
171 #define RUSSIAN 0x0419
172 #define SAMI_INARI 0x243B
173 #define SAMI_LULE_NORWAY 0x103B
174 #define SAMI_LULE_SWEDEN 0x143B
175 #define SAMI_NORTHERN_FINLAND 0x0C3B
176 #define SAMI_NORTHERN_NORWAY 0x043B
177 #define SAMI_NORTHERN_SWEDEN 0x083B
178 #define SAMI_SKOLT 0x203B
179 #define SAMI_SOUTHERN_NORWAY 0x183B
180 #define SAMI_SOUTHERN_SWEDEN 0x1C3B
181 #define SANSKRIT 0x044F
182 #define SERBIAN_LATIN 0x081A
183 #define SERBIAN_LATIN_BOSNIA_HERZEGOVINA 0x181A
184 #define SERBIAN_CYRILLIC 0x0C1A
185 #define SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA 0x1C1A
186 #define SESOTHO_SA_LEBOA 0x046C
187 #define SINHALA 0x045B
188 #define SLOVAK 0x041B
189 #define SLOVENIAN 0x0424
190 #define SPANISH_TRADITIONAL_SORT 0x040A
191 #define SPANISH_MEXICAN 0x080A
192 #define SPANISH_MODERN_SORT 0x0C0A
193 #define SPANISH_GUATEMALA 0x100A
194 #define SPANISH_COSTA_RICA 0x140A
195 #define SPANISH_PANAMA 0x180A
196 #define SPANISH_DOMINICAN_REPUBLIC 0x1C0A
197 #define SPANISH_VENEZUELA 0x200A
198 #define SPANISH_COLOMBIA 0x240A
199 #define SPANISH_PERU 0x280A
200 #define SPANISH_ARGENTINA 0x2C0A
201 #define SPANISH_ECUADOR 0x300A
202 #define SPANISH_CHILE 0x340A
203 #define SPANISH_UNITED_STATES 0x540A
204 #define SPANISH_URUGUAY 0x380A
205 #define SPANISH_PARAGUAY 0x3C0A
206 #define SPANISH_BOLIVIA 0x400A
207 #define SPANISH_EL_SALVADOR 0x440A
208 #define SPANISH_HONDURAS 0x480A
209 #define SPANISH_NICARAGUA 0x4C0A
210 #define SPANISH_PUERTO_RICO 0x500A
211 #define SWAHILI 0x0441
212 #define SWEDISH 0x041D
213 #define SWEDISH_FINLAND 0x081D
214 #define SYRIAC 0x045A
215 #define TAMIL 0x0449
216 #define TATAR 0x0444
217 #define TELUGU 0x044A
218 #define THAI 0x041E
219 #define TIBETAN_BHUTAN 0x0851
220 #define TIBETAN_PRC 0x0451
221 #define TSWANA 0x0432
222 #define UKRAINIAN 0x0422
223 #define TURKISH 0x041F
224 #define TURKMEN 0x0442
225 #define UIGHUR 0x0480
226 #define UPPER_SORBIAN 0x042E
227 #define URDU 0x0420
228 #define URDU_INDIA 0x0820
229 #define UZBEK_LATIN 0x0443
230 #define UZBEK_CYRILLIC 0x0843
231 #define VIETNAMESE 0x042A
232 #define WELSH 0x0452
233 #define WOLOF 0x0488
234 #define XHOSA 0x0434
235 #define YAKUT 0x0485
236 #define YI 0x0478
237 #define YORUBA 0x046A
238 #define ZULU 0x0435
241 #define LOCALE_LANGUAGE_LEN 6
242 #define LOCALE_COUNTRY_LEN 10
244 #ifdef __cplusplus
245 extern "C"
246 {
247 #endif
248 
253  typedef struct
254  {
255  char language[LOCALE_LANGUAGE_LEN]; /* Two or three letter language code */
256  char country[LOCALE_COUNTRY_LEN]; /* Two or three letter country code (Sometimes with Cyrl_
257  prefix) */
258  DWORD code; /* 32-bit unsigned integer corresponding to the locale */
259  } SYSTEM_LOCALE;
260 
261  FREERDP_API DWORD freerdp_get_system_locale_id(void);
262  FREERDP_API const char* freerdp_get_system_locale_name_from_id(DWORD localeId);
263  FREERDP_API int freerdp_detect_keyboard_layout_from_system_locale(DWORD* keyboardLayoutId);
264 
271  FREERDP_API const SYSTEM_LOCALE* freerdp_get_system_locale_list(size_t* count);
272 
280  FREERDP_API INT64 freerdp_get_locale_id_from_string(const char* locale);
281 
288  FREERDP_API DWORD freerdp_get_keyboard_default_layout_for_locale(DWORD locale);
289 
290 #ifdef __cplusplus
291 }
292 #endif
293 
294 #endif /* FREERDP_LOCALE_H */
A SYSTEM_LOCALE holding details about a locale.
Definition: locale.h:254