X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Georg Newsgroups: comp.os.msdos.djgpp Subject: GNU gettext Date: Sat, 17 Mar 2012 03:48:00 -0700 (PDT) Organization: http://groups.google.com Lines: 42 Message-ID: NNTP-Posting-Host: 2.174.228.36 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1331981403 10185 127.0.0.1 (17 Mar 2012 10:50:03 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sat, 17 Mar 2012 10:50:03 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: d17g2000vba.googlegroups.com; posting-host=2.174.228.36; posting-account=v5xbdQoAAAAOGc9Ccc-kLZyobvPlN3Qr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4,gzip(gfe) Bytes: 2513 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I am porting a program from Linux to DOS. This then uses my FLTK for DOS port which allows to display UTF8 characters using an ISO10646 truetype font. The linux program uses "gettext" to allow to display the menu items in different languages. There is a "po" directory with files for these different languages. In "main.cpp" there are the following commands: // GNU gettext initialization setlocale(LC_MESSAGES, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); Within the other program files which define the menus there is defined: #define _(String) gettext((String)) this refers to e.g. this command: fl_alert(_("Cannot open file...")); DJGPP/libintl compiles the programs fine but I am not sure what it actually does when executing the commands mentioned above. Currently I have an invalid name for "PACKAGE" and "LOCALEDIR" and this results in the default English messages being displayed. I read the gtxt readme file but I am not sure if that fits my situation since I use my own fonts. My keyboard driver already converts from ibm codepage 850 to iso8859-1 and there is a virtual keyboard that lets you pick special characters from the displayed font. Can I use the DJGPP version of "gettext" in my situation and if yes, how? I am not using Borland "gettext" at all in the code. If I get "gettext" to work, can it be used with a command line option or a menu in the program to allow to select the desired language? Georg