diff options
author | Ulrich Drepper <drepper@cygnus.com> | 2000-06-16 07:49:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@cygnus.com> | 2000-06-16 07:49:23 +0000 |
commit | 60d2084de5dc3b65e6657f695f0f26df24b0f565 (patch) | |
tree | 224f21c30351570d6d7f06a385e829d5ab320f67 /misc/README-Tcl | |
download | external_gettext-60d2084de5dc3b65e6657f695f0f26df24b0f565.zip external_gettext-60d2084de5dc3b65e6657f695f0f26df24b0f565.tar.gz external_gettext-60d2084de5dc3b65e6657f695f0f26df24b0f565.tar.bz2 |
Initial revision
Diffstat (limited to 'misc/README-Tcl')
-rw-r--r-- | misc/README-Tcl | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/misc/README-Tcl b/misc/README-Tcl new file mode 100644 index 0000000..7b9f6f9 --- /dev/null +++ b/misc/README-Tcl @@ -0,0 +1,52 @@ + Gettext support for Tcl + ======================= + +The file `tcl_gettext.c' contains the first attempt to provide an +interface for Tcl. I know that TclX already supports `catgets', but +because GNU uses `gettext' and because I think `gettext' is the better +concept I wrote this file. + + +Unlike many other interpreter extension I haven't provided a +`tclAppInit.c' file. I have three reason: it's easy to write (see +Ousterhout's book), It will probably combined with other extensions +and so would be more or less useless. But the most important reason +is that I don't find Tcl useful without the dynamic loading introduced +in version 7.5. + +The way I think you should use this module is to build a dynamic +object and load it at runtime with the command `load'. The following +transcript shows the way I work on my Linux/ELF box. Consult other +Tcl modules or a local wizard to see how it works for your system. + + +1. Compile the file to position independent object code: + + gcc -fPIC -O3 -c tcl_gettext.c + + (The file `tcl.h' from tcl7.5 or up and `libintl.h' as installed + from GNU gettext must be found in the path.) + +2. Link the file to a shared object: + + gcc -shared -o gettext.so tcl_gettext.o -lintl + + (The system's or GNU gettext libintl.a must be found in the path + of the linker.) + +3. Now we are ready to run: + +bash> tclsh7.5 +% load ./gettext.so Gettext +% textdomain "xxx" +% gettext "some string" +The translated form +% exit +bash> + + +If you have some ideas how to improve this or you found a bug, please +let me know. + +Ulrich Drepper <drepper@gnu.ai.mit.edu>, 18. December 1995. + |