1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
18 #endif /* __cplusplus */
20 #include "freeciv_config.h"
22 #ifdef FREECIV_HAVE_LOCALE_H
26 #include "shared.h" /* bool */
28 #ifdef FREECIV_ENABLE_NLS
30 /* Include libintl.h only if nls enabled.
31 * It defines some wrapper macros that
32 * we don't want defined when nls is disabled. */
33 #ifdef FREECIV_HAVE_LIBINTL_H
38 #define _(String) gettext(String)
39 #define DG_(domain, String) dgettext(domain, String)
40 #define N_(String) String
41 #define Q_(String) skip_intl_qualifier_prefix(gettext(String))
42 #define PL_(String1, String2, n) ngettext((String1), (String2), (n))
45 #define R__(String) dgettext("freeciv-ruledit", String)
46 #define RQ_(String) skip_intl_qualifier_prefix(dgettext("freeciv-ruledit", String))
48 #else /* FREECIV_ENABLE_NLS */
51 #define _(String) (String)
52 #define DG_(domain, String) (String)
53 #define N_(String) String
54 #define Q_(String) skip_intl_qualifier_prefix(String)
55 #define PL_(String1, String2, n) ((n) == 1 ? (String1) : (String2))
56 #define C_(String) capitalized_string(String)
59 #define R__(String) (String)
60 #define RQ_(String) skip_intl_qualifier_prefix(String)
65 #define textdomain(Domain)
66 #define bindtextdomain(Package, Directory)
68 #endif /* FREECIV_ENABLE_NLS */
70 /* This provides an untranslated version of Q_ that allows the caller to
71 * get access to the original string. This may be needed for comparisons,
73 #define Qn_(String) skip_intl_qualifier_prefix(String)
75 const char *skip_intl_qualifier_prefix(const char *str
);
76 char *capitalized_string(const char *str
);
77 void free_capitalized(char *str
);
78 void capitalization_opt_in(void);
79 bool is_capitalization_enabled(void);
81 const char *get_locale_dir(void);
85 #endif /* __cplusplus */
87 #endif /* FC__FCINTL_H */