bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gettext and C usage


From: Karl Berry
Subject: gettext and C usage
Date: Mon, 25 Feb 2002 13:22:05 -0500

I wonder if the gettext manual could include the recommended constructs
to declare gettext from a .h file.  (At least I couldn't find such.)
For Texinfo, I'm currently using:

#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#ifndef HAVE_SETLOCALE
#define setlocale(category,locale) /* empty */
#endif

/* For gettext (NLS).  */
#include "gettext.h"
#if !HAVE_LC_MESSAGES
# define LC_MESSAGES (-1)
#endif
#define _(String) gettext (String)
#define N_(String) (String)

Is this right?  Any changes to suggest?

Thanks,
karl



reply via email to

[Prev in Thread] Current Thread [Next in Thread]