gettext.hpp

Go to the documentation of this file.
00001 /* $Id: gettext.hpp 23842 2008-02-16 08:47:16Z mordante $ */
00002 /*
00003    Copyright (C) 2003 - 2008 by David White <dave@whitevine.net>
00004    Part of the Battle for Wesnoth Project http://www.wesnoth.org/
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License version 2
00008    or at your option any later version.
00009    This program is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY.
00011 
00012    See the COPYING file for more details.
00013 */
00014 
00015 #ifndef GETTEXT_HPP_INCLUDED
00016 #define GETTEXT_HPP_INCLUDED
00017 
00018 // gettext-related declarations
00019 
00020 #include <libintl.h>
00021 
00022 const char* egettext(const char*);
00023 const char* sgettext(const char*);
00024 const char* dsgettext(const char * domainname, const char *msgid);
00025 const char* sngettext(const char *singular, const char *plural, int n);
00026 const char* dsngettext(const char * domainname, const char *singular, const char *plural, int n);
00027 
00028 #ifdef GETTEXT_DOMAIN
00029 # define _(String) dsgettext(GETTEXT_DOMAIN,String)
00030 # define _n(String1,String2,Int) dsngettext(String1,String2,Int)
00031 # ifdef gettext
00032 #  undef gettext
00033 # endif
00034 # define gettext(String) dgettext(GETTEXT_DOMAIN,String)
00035 # define sgettext(String) dsgettext(GETTEXT_DOMAIN,String)
00036 # define sngettext(String1,String2,Int) dsngettext(GETTEXT_DOMAIN,String1,String2,Int)
00037 #else
00038 # define _(String) sgettext(String)
00039 # define _n(String1,String2,Int) sngettext(String1,String2,Int)
00040 #endif
00041 
00042 #define gettext_noop(String) String
00043 #define N_(String) gettext_noop (String)
00044 
00045 #endif

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs