[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Using gettext for runtime translations
From: |
Torsten Bronger |
Subject: |
Using gettext for runtime translations |
Date: |
Tue, 12 Apr 2005 10:26:31 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Hallöchen!
For Texinfo (actually makeinfo), we need to translate things like
"see section" or "node" to various languages. The language is *not*
determined by the locale but by a parameter in the input file. The
best way would be (for German as an example)
translation = super_gettext("see ", "de");
However, this doesn't exist (yet?). So I have to set the locale
manually. Using "setenv", I have to tell gettext to empty its
cache, according to the gettext manual. Is this also true if one
uses setlocale()? Is setenv better than setlocale for some reason?
And most importantly: What is a reliable way to know the language's
name? For example, German is "de", but this doesn't work. Instead,
it has to be "de_DE". Does "ll_CC" work everywhere and always,
given that the translations are properly installed? Is there a
decent fallback mechanism or do I have to mimic one?
Thank you!
Tschö,
Torsten.
--
Torsten Bronger, aquisgrana, europa vetus
- Using gettext for runtime translations,
Torsten Bronger <=