[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing multi-lingual terminal applications
- To: Shlomi Fish <shlomif(at-nospam)techst02.technion.ac.il>
- Subject: Re: Writing multi-lingual terminal applications
- From: Tzafrir Cohen <tzafrir(at-nospam)technion.ac.il>
- Date: Mon, 26 Mar 2001 09:54:57 +0200 (IST)
- Cc: <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <Pine.SOL.4.10.10103260937510.22580-100000@techst02.technion.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Mon, 26 Mar 2001, Shlomi Fish wrote:
>
> How is it possible to write terminal applications that can display at
> least three different languages. (not simultaneously).
>
> A friend of mine wishes to do such a thing. AFAIK, all he needs to do is
> to adapt the output to the various codepages of the languages. But is
> there another catch?
Use gettext to supply different output strings, depending on the user
language.
As for the result:
$ LANG=it tar --help |head
GNU `tar' salva molti file insieme in un solo archivio su nastro o su
disco
e puР ripristinare singoli file dall'archivio.
$ LANG=ru tar --help |head -n 3
GNU `tar' сохраняет множество файлов в одном архиве на ленте или диске
и может восставливать отдельные файлы из архива.
(as you can see, my terminal is not set up for italian and for russian.
Well, I don't use those languages, so that's not for me to worry about.
Those who want to use russian messages will have a terminal with russian
fonts).
See the documentation of gettext (info gettext). also see locale (7).
--
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il