Search code examples
macosgnupg

Change the language of gnupg on a Mac?


I am running OS-X El-Capitan with MacPorts. System language of my Mac is Spanish. How can I tell gnupg to use English as language for any output such as error messages?

I have installed gpg 1.4.19 via macports and gpg 2.0.28 via GPGTools. Both gpg -h and gpg2 -h produce Spanish output, while other unix commands such as git --help or man -h produce English output.

In this post a similar problem is discussed, but I could not apply the recommendations given there to my OS: http://www.gossamer-threads.com/lists/gnupg/users/52908


Solution

  • Like lots of other internationalized tools, GnuPG takes the LANG environment variable into account. Either export the variable for the whole session, where it will be valid for all executed applications from this terminal (you could also add this to your dotfiles):

    export LANG=en
    gpg --version
    

    or prefix LANG=en for individual calls of gpg if you only want to run it in English language a single time:

    LANG=en gpg --version