Discussion:
gpg command output language???
Bo Berglund
2011-01-16 07:34:20 UTC
Permalink
When I run the "gpg2 -h" command I get a result that is a mixture of
English and Swedish words, which does not make a lot of sense.

I am running Windows XP-Pro *English* version but because I am in
Sweden I use the Swedish keyboard.
I DON'T want to have anything fed back from programs like gpg in
Swedish, though....
It beats me why a program like gpg should detect the keyboard type and
change its language like this, language setting should be a volontary
change by the user always! Just think how good it would be for an
English speaking user to try and use a PC that happened to be set for
say a Slovenian keyboard. Not possible to understand the output,
right?

So how can I change gpg such that it sends its responses in English
only? I have checked gpg.conf, but there is no language setting there.
--
Bo Berglund
Developer in Sweden
Paul Richard Ramer
2011-01-16 08:47:36 UTC
Permalink
Post by Bo Berglund
It beats me why a program like gpg should detect the keyboard type and
change its language like this, language setting should be a volontary
change by the user always! Just think how good it would be for an
English speaking user to try and use a PC that happened to be set for
say a Slovenian keyboard. Not possible to understand the output,
right?
So how can I change gpg such that it sends its responses in English
only? I have checked gpg.conf, but there is no language setting there.
The GPG man page gives the following information:

Operation is further controlled by a few environment variables:
[...]

LANGUAGE
Apart from its use by GNU, it is used in the W32 version to
override the language selection done through the Registry. If
used and set to a valid and available language name (langid),
the file with the translation is loaded from
gpgdir/gnupg.nls/langid.mo. Here gpgdir is the directory out of
which the gpg binary has been loaded. If it can't be loaded the
Registry is tried and as last resort the native Windows locale
system is used.


-Paul
--
Please use my PGP key when sending me e-mail, if you can.

PGP Key ID: 0x3DB6D884
PGP Fingerprint: EBA7 88B3 6D98 2D4A E045 A9F7 C7C6 6ADF 3DB6 D884
Bo Berglund
2011-01-16 09:19:38 UTC
Permalink
On Sun, 16 Jan 2011 00:47:36 -0800, Paul Richard Ramer
Post by Paul Richard Ramer
Post by Bo Berglund
It beats me why a program like gpg should detect the keyboard type and
change its language like this, language setting should be a volontary
change by the user always! Just think how good it would be for an
English speaking user to try and use a PC that happened to be set for
say a Slovenian keyboard. Not possible to understand the output,
right?
So how can I change gpg such that it sends its responses in English
only? I have checked gpg.conf, but there is no language setting there.
How do you locate the "GPG man page"??
Post by Paul Richard Ramer
[...]
LANGUAGE
Apart from its use by GNU, it is used in the W32 version to
override the language selection done through the Registry. If
used and set to a valid and available language name (langid),
the file with the translation is loaded from
gpgdir/gnupg.nls/langid.mo. Here gpgdir is the directory out of
which the gpg binary has been loaded. If it can't be loaded the
Registry is tried and as last resort the native Windows locale
system is used.
Sounds like a very strange way to do this, an environment variable
that is not even named with reference to GPG can affect all
applications on the PC....
A more appropriate way would have been to have this entered in the
conf file or at least named GPG_LANGUAGE instead of the generic name
it now has...

Additionally: What am I supposed to enter as "langid" in such an
environment variable? "ENGLISH", "EN", "409" or what?
--
Bo Berglund
Developer in Sweden
Ingo Klöcker
2011-01-16 11:21:07 UTC
Permalink
Post by Bo Berglund
On Sun, 16 Jan 2011 00:47:36 -0800, Paul Richard Ramer
Post by Paul Richard Ramer
Post by Bo Berglund
It beats me why a program like gpg should detect the keyboard type
and change its language like this, language setting should be a
volontary change by the user always! Just think how good it would
be for an English speaking user to try and use a PC that happened
to be set for say a Slovenian keyboard. Not possible to
understand the output, right?
So how can I change gpg such that it sends its responses in
English only? I have checked gpg.conf, but there is no language
setting there.
How do you locate the "GPG man page"??
I don't know how to do this on Windows, but you can always try Google.
The second hit for "GPG man page" is what you are looking for.
Post by Bo Berglund
Post by Paul Richard Ramer
[...]
LANGUAGE
Apart from its use by GNU, it is used in the W32 version to
override the language selection done through the Registry.
If used and set to a valid and available language name
(langid), the file with the translation is loaded from
gpgdir/gnupg.nls/langid.mo. Here gpgdir is the directory
out of which the gpg binary has been loaded. If it can't
be loaded the Registry is tried and as last resort the
native Windows locale system is used.
Sounds like a very strange way to do this, an environment variable
that is not even named with reference to GPG can affect all
applications on the PC....
Well, that's the point of this environment variable. It is supposed to
be recognized by all applications. If you only want this variable to
affect gpg then write a simple script which sets the variable and then
calls gpg.
Post by Bo Berglund
A more appropriate way would have been to have this entered in the
conf file or at least named GPG_LANGUAGE instead of the generic name
it now has...
Additionally: What am I supposed to enter as "langid" in such an
environment variable? "ENGLISH", "EN", "409" or what?
Try "C". This should give you untranslated (and thus English) messages.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20110116/bf6aafae/attachment.pgp>
MFPA
2011-01-16 13:39:14 UTC
Permalink
Hi


On Sunday 16 January 2011 at 9:19:38 AM, in
Post by Bo Berglund
How do you locate the "GPG man page"??
I'm using GnuPG 1.4.x, not 2.x, and my copy of "GPG man page" is the
text file called "gpg.man" that lives in the "DOC" folder under my
GnuPG program directory.


- --
Best regards

MFPA mailto:expires2011 at ymail.com

It's better to feed one cat than many mice
Bo Berglund
2011-01-16 19:45:45 UTC
Permalink
On Sun, 16 Jan 2011 12:21:07 +0100, Ingo Kl?cker <kloecker at kde.org>
Post by Ingo Klöcker
Post by Bo Berglund
Additionally: What am I supposed to enter as "langid" in such an
environment variable? "ENGLISH", "EN", "409" or what?
Try "C". This should give you untranslated (and thus English) messages.
Did not work at all...

I set the environment variable to "C" and then ran gpg2 -h. Example of
output:

-s, --sign make a signature
--clearsign make a clear text signature
-b, --detach-sign skapa signatur i en separat fil
-e, --encrypt kryptera data

(Both English and Swedish...)
And later:

-v, --verbose utf?rlig
-n, --dry-run g?r inga Sndringar
-i, --interactive frsga innan ?verskrivning
--openpgp anvSnd strikt OpenPGP-beteende

Characters used for the Swedish umlauted chars ?????? are completely
wrong...
--
Bo Berglund
Developer in Sweden
Ingo Klöcker
2011-01-16 21:24:58 UTC
Permalink
Post by Bo Berglund
On Sun, 16 Jan 2011 12:21:07 +0100, Ingo Kl?cker <kloecker at kde.org>
Post by Ingo Klöcker
Post by Bo Berglund
Additionally: What am I supposed to enter as "langid" in such an
environment variable? "ENGLISH", "EN", "409" or what?
Try "C". This should give you untranslated (and thus English)
messages.
Did not work at all...
Hmm. Yeah. I should have read the text from the man page. It says
"[...] gpgdir/gnupg.nls/langid.mo. Here gpgdir is the directory out of
which the gpg binary has been loaded."

So you need to locate the directory gpgdir/gnupg.nls and look for
available *.mo files. If there does not seem to be a file for English
then try to guess the langid for English from the langids of the
available languages.


Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20110116/1e10d5d0/attachment.pgp>
Werner Koch
2011-01-17 10:03:48 UTC
Permalink
Post by Bo Berglund
I set the environment variable to "C" and then ran gpg2 -h. Example of
Use

set LC_MESSAGES=C
Post by Bo Berglund
Characters used for the Swedish umlauted chars ?????? are completely
wrong...
They are UTF-8 encoded. The console has problems to render them,
though.


Salam-Shalom,

Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Benjamin Marwell
2011-01-17 13:14:46 UTC
Permalink
Hi there,

LANG=C is always ANSII. For UTF-8 use en_EN.UTF-8.

Regards.
Post by Werner Koch
Post by Bo Berglund
I set the environment variable to "C" and then ran gpg2 -h. Example of
Use
set LC_MESSAGES=C
Post by Bo Berglund
Characters used for the Swedish umlauted chars ?????? are completely
wrong...
They are UTF-8 encoded. ?The console has problems to render them,
though.
Salam-Shalom,
? Werner
--
Die Gedanken sind frei. ?Ausnahmen regelt ein Bundesgesetz.
_______________________________________________
Gnupg-users mailing list
Gnupg-users at gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Werner Koch
2011-01-17 19:22:33 UTC
Permalink
Post by Benjamin Marwell
LANG=C is always ANSII. For UTF-8 use en_EN.UTF-8.
Sorry, we are talking about GnuPG's Windows port. The locale feature
under Windows is very different from what we all known. GnuPG uses its
own gettext implementation (common/w32-gettext.c) and if you check this
you will see that LC_MESSAGES is what we are looking for.


Salam-Shalom,

Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
Bo Berglund
2011-01-17 19:52:13 UTC
Permalink
Post by Werner Koch
Post by Bo Berglund
I set the environment variable to "C" and then ran gpg2 -h. Example of
Use
set LC_MESSAGES=C
Yes! This did the trick. Now the language is indeed English.
Both on Win7 and WinXP.
--
Bo Berglund
Developer in Sweden
Bo Berglund
2011-01-16 19:46:51 UTC
Permalink
On Sun, 16 Jan 2011 13:39:14 +0000, MFPA <expires2011 at ymail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi
On Sunday 16 January 2011 at 9:19:38 AM, in
Post by Bo Berglund
How do you locate the "GPG man page"??
I'm using GnuPG 1.4.x, not 2.x, and my copy of "GPG man page" is the
text file called "gpg.man" that lives in the "DOC" folder under my
GnuPG program directory.
I have installed GPG2 as part of Gpg4Win 2.0.4 and there are no traces
at all of any doc folder or files....
--
Bo Berglund
Developer in Sweden
Peter Lebbing
2011-01-18 11:37:11 UTC
Permalink
Post by Bo Berglund
On Sun, 16 Jan 2011 13:39:14 +0000, MFPA <expires2011 at ymail.com>
Post by MFPA
I'm using GnuPG 1.4.x, not 2.x, and my copy of "GPG man page" is the
text file called "gpg.man" that lives in the "DOC" folder under my
GnuPG program directory.
I have installed GPG2 as part of Gpg4Win 2.0.4 and there are no traces
at all of any doc folder or files....
The manual at [1] is, as far as I can see at a glance, largely the same as the
gpg2 man page. A lot of your questions so far could have been answered by
reading that manual.

Also, you could fetch and unpack the source for GnuPG. It is bound to contain a
lot of documentation for you as the developer of a new frontend, although a lot
of the documentation will be there only in source format, not as the man pages
or HTML files that would be generated from that source format.

Peter.

[1] <http://gnupg.org/documentation/manuals/gnupg/Invoking-GPG.html>
--
I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at http://wwwhome.cs.utwente.nl/~lebbing/pubkey.txt
(new, larger key created on Nov 12, 2009)
Loading...