Tizen 2.1 release
[platform/core/uifw/e17.git] / src / bin / e_intl.h
1 #ifdef E_INTERNAL
2 #if E_INTERNAL
3
4 #ifdef E_TYPEDEFS
5 #ifdef HAVE_GETTEXT
6 #define _(str) gettext(str)
7 #define d_(str, dom) dgettext(PACKAGE dom, str)
8 #define P_(str, str_p, n) ngettext(str, str_p, n)
9 #define dP_(str, str_p, n, dom) dngettext(PACKAGE dom, str, str_p, n)
10 #else
11 #define _(str) (str)
12 #define d_(str, dom) (str)
13 #define P_(str, str_p, n) (str_p)
14 #define dP_(str, str_p, n, dom) (str_p)
15 #endif
16 /* These macros are used to just mark strings for translation, this is useful
17  * for string lists which are not dynamically allocated
18  */
19 #define N_(str) (str)
20 #define NP_(str, str_p) str, str_p
21
22 typedef struct _E_Locale_Parts E_Locale_Parts;
23
24 #else
25 #ifndef E_INTL_H
26 #define E_INTL_H
27
28 #define E_INTL_LOC_CODESET   1 << 0
29 #define E_INTL_LOC_REGION    1 << 1
30 #define E_INTL_LOC_MODIFIER  1 << 2
31 #define E_INTL_LOC_LANG      1 << 3
32
33 struct _E_Locale_Parts
34 {
35    int mask;
36    const char *lang;
37    const char *region;
38    const char *codeset;
39    const char *modifier;
40 };
41
42 EINTERN int              e_intl_init(void);
43 EINTERN int              e_intl_shutdown(void);
44 EINTERN int              e_intl_post_init(void);
45 EINTERN int              e_intl_post_shutdown(void);
46 /* Setting & Getting Language */
47 EAPI void                e_intl_language_set(const char *lang);
48 EAPI const char         *e_intl_language_get(void);
49 EAPI const char         *e_intl_language_alias_get(void);
50 EAPI Eina_List          *e_intl_language_list(void);
51 /* Setting & Getting Input Method */
52 EAPI void                e_intl_input_method_set(const char *method);
53 EAPI const char         *e_intl_input_method_get(void);
54 EAPI Eina_List          *e_intl_input_method_list(void);
55 EAPI const char         *e_intl_imc_personal_path_get(void);
56 EAPI const char         *e_intl_imc_system_path_get(void);
57
58 /* Getting locale */
59 EAPI E_Locale_Parts     *e_intl_locale_parts_get(const char *locale);
60 EAPI void                e_intl_locale_parts_free(E_Locale_Parts *locale_parts);
61 EAPI char               *e_intl_locale_parts_combine(E_Locale_Parts *locale_parts, int mask);
62 EAPI char               *e_intl_locale_charset_canonic_get(const char *charset);
63
64 #endif
65 #endif
66
67 #endif
68 #endif