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

Re: flex and gettext



>>"Will" == W L Estes <wlestes@uncg.edu> writes:

 >> The work it would take to update the .po files should not be an issue.
 Will> My main concern is this: the i18n work on flex was done for the debian
 Will> distribution and is not a part of the main flex tree. I am unfamiliar
 Will> with gettext and how to incorporate it into a program.

	Oh, since the debian version has already incorporated gettext,
 it is easy enough to port that forward. From what I can see, we need:
======================================================================
flex/configure.in: add
AM_GNU_GETTEXT
-------------------------------------------
 flex/flexdef.h:
-#define _(String) (String)
+#include <libintl.h>
+#define _(String) gettext (String)
-------------------------------------------
flex/main.c:
line 135
        {
        int i;
 
+       setlocale(LC_MESSAGES, "");
+       textdomain("flex");
+       bindtextdomain("flex", "/usr/share/locale");
-------------------------------------------
======================================================================

	Which is fairly simple.

	What I can't do is actually test any of this, since I don't
 know any supported language beyond english.

	manoj
-- 
 Ignore previous fortune.
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: