27 Nov 2000 13:40:32 +0100
Stephane Corthesy <email@example.com> writes:
> This is a question more related to GNU text localization system.
> What are the environment variables used to set the current language?
> I need to parse the output (as I can't rely on the status code... It
> would be nice if there was one error code per error message), but I
> want to force gpg to speak English.
You could use --status-fd, which is locale-independent.
The environment variables are documented in the GNU C Library manual:
| Categories of Activities that Locales Affect
| The purposes that locales serve are grouped into "categories", so
| that a user or a program can choose the locale for each category
| independently. Here is a table of categories; each name is both an
| environment variable that a user can set, and a macro name that you can
| use as an argument to `setlocale'.
| This category applies to collation of strings (functions `strcoll'
| and `strxfrm'); see *Note Collation Functions::.
| This category applies to classification and conversion of
| characters, and to multibyte and wide characters; see *Note
| Character Handling::, and *Note Character Set Handling::.
| This category applies to formatting monetary values; see *Note
| General Numeric::.
| This category applies to formatting numeric values that are not
| monetary; see *Note General Numeric::.
| This category applies to formatting date and time values; see
| *Note Formatting Calendar Time::.
| This category applies to selecting the language used in the user
| interface for message translation (*note The Uniforum approach::;
| *note Message catalogs a la X/Open::).
| This is not an environment variable; it is only a macro that you
| can use with `setlocale' to set a single locale for all purposes.
| Setting this environment variable overwrites all selections by the
| other `LC_*' variables or `LANG'.
| If this environment variable is defined, its value specifies the
| locale to use for all purposes except as overridden by the
| variables above.
| When developing the message translation functions it was felt that
| the functionality provided by the variables above is not sufficient.
| For example, it should be possible to specify more than one locale name.
| Take a Swedish user who better speaks German than English, and a program
| whose messages are output in English by default. It should be possible
| to specify that the first choice of language is Swedish, the second
| German, and if this also fails to use English. This is possible with
| the variable `LANGUAGE'. For further description of this GNU extension
| see *Note Using gettextized software::.
Florian Weimer Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart http://cert.uni-stuttgart.de/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898
Archive is at http://lists.gnupg.org - Unsubscribe by sending mail
with a subject of "unsubscribe" to firstname.lastname@example.org