the slgettext module

download index

This module adds support for gettext internationalization to S-Lang. All the gettext functions of Libc 2.2 have been wrapped (but the only ones tested are gettext and dgettext).

This module was generated with slirp 1.5 beta. There are a few bugs in the beta, much of the generated code is not used by the module, and weeding out the unused code saves 10k out of 20 in the object file, so only the tweaked slirp output file is included.

install

type 'make', move the gettext-module.so file into your module load path, and move gettext.sl into the slang load path of any application you wish to use it with. If you use slrn, you may remove the line
setlocale(LC_ALL, "");
from gettext.sl. This module has not been tested with slrn.

using slgettext

To internationalize a script, add the lines

 require("gettext");
 textdomain(your text domain);
 
There are several ways to internationalize message("hello"):

copyright

slgettext is Copyright (c) 2004 Paul Boekholt. Released under the terms of the GNU GPL (version 2 or later).