William J Poser wrote:
There is a lot of information on the GNU approach to i18n
at: http://www.gnu.org/software/gettext/manual/gettext.html.

Yes, that's an excellent place to start. It is based on the design philosophy that underlies the i18n library functions that were defined in the original ANSI C standard. Those were the foundation for both C++ and Java i18n as well.

The idea is very simple, and incredibly powerful. Everything that needs to be localized within a program should be contained in an external configuration/database. The particular data is selected based on an externally chosen locale that can be set by the user in some way.

It is essentially runtime polymorphism where the particular subclass is chosen externally from the program. All the rest is the details of how its done and what you can do. What gives it most of its power is the fact that new locales and translations of message catalogs can be done without additional changes to the programs that support them. More simply, you don't have to rewrite your code to support a new language.

For what it's worth, according to the gettext manual, there is an interface to the gettext library for shell scripts. It's documented here:

http://www.gnu.org/software/gettext/manual/html_mono/gettext.html#SEC197

The Bash Reference Manual is similarly terse about how to use it:

http://www.gnu.org/software/bash/manual/bashref.html#SEC13

--
D. Dale Gulledge, Sr. Programmer,
[EMAIL PROTECTED]
C, C++, Perl, Unix (QNX, AIX, Linux), Oracle, Java,
Internationalization (i18n), Lisp, HTML, CGI.

--
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to