Added a new provider type to support the retrieval of movie schedules
[maevies] / src / localisation.h
1 /*******************************************************************************
2  * Copyright (c) 2007-2008 INdT, (c) 2009 Nokia.
3  *
4  * This code example is licensed under a MIT-style license,
5  * that can be found in the file called "COPYING" in the package
6  *
7  */
8
9 /*
10  ============================================================================
11  Name        : localisation.h
12  Author      : Simón Pena
13  Version     : 0.1
14  Description : Header with localization facilities
15  ============================================================================
16  */
17 #ifndef LOCALISATION_H
18 #define LOCALISATION_H
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif                          /* HAVE_CONFIG_H */
23
24 #ifdef ENABLE_NLS
25 #include <locale.h>
26 #include <libintl.h>
27 #define _(String) gettext(String)
28 #ifdef gettext_noop
29 #define N_(String) gettext_noop(String)
30 #else
31 #define N_(String) (String)
32 #endif
33 #define locale_init() setlocale(LC_ALL, "");\
34     bindtextdomain(GETTEXT_PACKAGE, localedir);\
35     textdomain(GETTEXT_PACKAGE);
36 #else                           /* NLS is disabled */
37 #define locale_init()
38 #define _(String) (String)
39 #define N_(String) (String)
40 #define textdomain(String) (String)
41 #define gettext(String) (String)
42 #define dgettext(Domain,String) (String)
43 #define dcgettext(Domain,String,Type) (String)
44 #define bindtextdomain(Domain,Directory) (Domain)
45 #define bind_textdomain_codeset(Domain,Codeset) (Codeset)
46 #endif                          /* ENABLE_NLS */
47
48 #endif /* LOCALISATION_H */
49 #ifndef LOCALISATION_H
50 #define LOCALISATION_H
51
52 #ifdef HAVE_CONFIG_H
53 #include "config.h"
54 #endif                          /* HAVE_CONFIG_H */
55
56 #ifdef ENABLE_NLS
57 #include <libintl.h>
58 #define _(String) gettext(String)
59 #ifdef gettext_noop
60 #define N_(String) gettext_noop(String)
61 #else
62 #define N_(String) (String)
63 #endif
64 #define locale_init() setlocale(LC_ALL, "");\
65     bindtextdomain(GETTEXT_PACKAGE, localedir);\
66     textdomain(GETTEXT_PACKAGE);
67 #else                           /* NLS is disabled */
68 #define locale_init()
69 #define _(String) (String)
70 #define N_(String) (String)
71 #define textdomain(String) (String)
72 #define gettext(String) (String)
73 #define dgettext(Domain,String) (String)
74 #define dcgettext(Domain,String,Type) (String)
75 #define bindtextdomain(Domain,Directory) (Domain)
76 #define bind_textdomain_codeset(Domain,Codeset) (Codeset)
77 #endif                          /* ENABLE_NLS */
78
79 #endif /* LOCALISATION_H */
80