[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Writing multi-lingual terminal applications



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