[git] turn off localization

Richard L. Hamilton rlhamil at smart.net
Sat Jul 28 18:29:11 PDT 2012


The usual way of communicating the desired locale, certainly for command-line programs, is by setting appropriate environment variables.  The lowest priority (overridden by any of the others where they conflict) is LANG, which applies to all categories of locale information not set with one of the other environment variables.  Then there are category-specific environment variables:
LC_COLLATE		collation sequence
LC_CTYPE		character classification
LC_MESSAGES	message text
LD_MONETARY	currency symbol and notation
LC_NUMERIC		preferred separator and decimal character
LC_TIME			preferred date and time formats

and finally, all of the above can be overridden with LC_ALL

Thus, if I start with
sh-3.2$ locale
LANG="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_CTYPE="de_DE.UTF-8"
LC_MESSAGES="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_ALL=

but wish to run some single command and its descendants (in place of the locale command below) in another locale:

sh-3.2$ env LC_ALL=en_US.UTF-8 locale
LANG="de_DE.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

On Jul 28, 2012, at 7:19 AM, heapifyman wrote:

> Hello,
> 
> is there a way to turn off localization for a specific port? In my case git output on the command line is in German but I would like to have the original English output.
> How do I do that? Delete the file /opt/local/share/locale/de/LC_MESSAGES/git.mo ?
> 
> Thanks in advance for any help.
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/macports-users

-- 
eMail:				mailto:rlhamil at smart.net
Home page:			http://www.smart.net/~rlhamil/
Facebook, MySpace,
AIM, Yahoo, etc:		ask




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120728/ae9d09bb/attachment.html>


More information about the macports-users mailing list