tennis.map: Texture tweak
[neverball] / share / lang.h
1 /*
2  * Copyright (C) 2006 Jean Privat
3  *
4  * this file is  free software; you can redistribute  it and/or modify
5  * it under the  terms of the GNU General  Public License as published
6  * by the Free  Software Foundation; either version 2  of the License,
7  * or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT  ANY  WARRANTY;  without   even  the  implied  warranty  of
11  * MERCHANTABILITY or  FITNESS FOR A PARTICULAR PURPOSE.   See the GNU
12  * General Public License for more details.
13  */
14
15 #ifndef LANG_H
16 #define LANG_H
17
18 #if ENABLE_NLS
19 #include <libintl.h>
20
21 #define _(String)   gettext(String)
22 #define L_(String)  get_local_text(String)
23
24 #else
25
26 #define _(String)   (String)
27 #define L_(String)  (String)
28
29 #define ngettext(msgid, msgid_plural, n) ((n) == 1 ? (msgid) : (msgid_plural))
30
31 #endif /* ENABLE_NLS */
32
33 /* No-op, useful for marking up strings for extraction-only. */
34 #define N_(String)  (String)
35
36 /*---------------------------------------------------------------------------*/
37
38 void lang_init(const char *domain);
39
40 const char *sgettext(const char *);
41 const char *get_local_text(const char *);
42
43 /*---------------------------------------------------------------------------*/
44
45 #endif