1#ifndef __findlocale_h_
2#define __findlocale_h_
3
4typedef const char* FL_Lang;
5typedef const char* FL_Country;
6typedef const char* FL_Variant;
7
8typedef struct {
9 FL_Lang lang;
10 FL_Country country;
11 FL_Variant variant;
12} FL_Locale;
13
14typedef enum {
15 /* for some reason we failed to even guess: this should never happen */
16 FL_FAILED = 0,
17 /* couldn't query locale -- returning a guess (almost always English) */
18 FL_DEFAULT_GUESS = 1,
19 /* the returned locale type was found by successfully asking the system */
20 FL_CONFIDENT = 2
21} FL_Success;
22
23typedef enum {
24 FL_MESSAGES = 0
25} FL_Domain;
26
27/* This allocates/fills in a FL_Locale structure with pointers to
28 strings (which should be treated as static), or NULL for inappropriate /
29 undetected fields. */
30FL_Success FL_FindLocale(FL_Locale **locale);
31/* This should be used to free the struct written by FL_FindLocale */
32void FL_FreeLocale(FL_Locale **locale);
33
34#endif /*__findlocale_h_*/
35