aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-gettext.h
blob: ee11f2a988b1f0a01c4bf9942f0d981773907508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* w32-gettext.h - A simple gettext implementation for Windows targets.
   Copyright (C) 2005 g10 Code GmbH

   This file is part of libgpg-error.
 
   libgpg-error is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public License
   as published by the Free Software Foundation; either version 2.1 of
   the License, or (at your option) any later version.
 
   libgpg-error is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.
 
   You should have received a copy of the GNU Lesser General Public
   License along with libgpg-error; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */

#if ENABLE_NLS

#include <locale.h>
#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
# define LC_MESSAGES 1729
#endif

/* If we build on w32, we will use our own simple gettext
   implementation.  For now, this is not a drop in replacement, so we
   must cheat a bit and redirect all calls to the external gettext to
   an internal implementation.  We try to be as little invasive as
   possible, so that the refactorization of the code occurs at logical
   interfaces.

   Note that this function intimately knows the various definitions in
   the target libintl.h and the local gettext.h file, from which it is
   included.  */

#define bindtextdomain		_gpg_err_bindtextdomain
#define textdomain		_gpg_err_textdomain
#define dgettext		_gpg_err_dgettext
#define gettext			_gpg_err_gettext

/* Specify that the DOMAINNAME message catalog will be found
   in DIRNAME rather than in the system locale data base.  */
char *bindtextdomain (const char *domainname, const char *dirname);

const char *gettext (const char *msgid);

char *textdomain (const char *domainname);

char *dgettext (const char *domainname, const char *msgid);

#endif	/* ENABLE_NLS */