Switched from tinygettext/tags/tinygetext-supertux/ to tinygettext/trunk/
[supertux.git] / external / findlocale / findlocale.h
1 #ifndef __findlocale_h_
2 #define __findlocale_h_
3
4 typedef const char* FL_Lang;
5 typedef const char* FL_Country;
6 typedef const char* FL_Variant;
7
8 typedef struct {
9   FL_Lang    lang;
10   FL_Country country;
11   FL_Variant variant;
12 } FL_Locale;
13
14 typedef 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
23 typedef 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. */
30 FL_Success FL_FindLocale(FL_Locale **locale, FL_Domain domain);
31 /* This should be used to free the struct written by FL_FindLocale */
32 void FL_FreeLocale(FL_Locale **locale);
33
34 #endif /*__findlocale_h_*/