5

Today I noticed that when opening TortoiseHG the app was in Dutch (partially, not fully translated it seems). Looking around in my environment I found out that LANG=nl_NL.UTF-8.

It is indeed true that my locale is set to NL (i.e. number formats and all) but my language in OS X is set to English and I would expect my apps to be in English aswell. A locale is quite different from a language.

So my question is now, where do I report this bug to? Is it an iTerm2 issue or do I need to file a bug report somewhere else?

My goal is to have my number format according to Dutch standards (i.e. 123.456 = 123 thousand and 456 and my language still at English. OS X gets this, iTerm2 (or at least, TortoiseHG started from iTerm2) does not.

System Preferences - Language System Preferences - Region

# locale
LANG="nl_NL.UTF-8"
LC_COLLATE="nl_NL.UTF-8"
LC_CTYPE="nl_NL.UTF-8"
LC_MESSAGES="nl_NL.UTF-8"
LC_MONETARY="nl_NL.UTF-8"
LC_NUMERIC="nl_NL.UTF-8"
LC_TIME="nl_NL.UTF-8"
LC_ALL=

Versions:

  • OS X: 10.8.2
  • iTerm 2: 1.0.0.20120724
  • TurtoiseHG: 2.4
  • More likely you are exporting this value somewhere in your shell login scripts. Did you have a look at .profile etc? – Gerry Feb 25 '13 at 10:04
  • 2
    No, it's being done by iTerm2 (can be disabled in settings -> profiles -> terminal -> set locale variables automatically) – Wolph Feb 25 '13 at 10:40
7

The following will do the trick: Navigate to the iTerm2 -> Preferences -> Profiles -> Terminal and unset the "Set local variables automatically" in Environment section.

| improve this answer | |
6

In both iTerm and Terminal the LC_ variables depend on the region selected in System Preferences (defaults read -g AppleLocale) by default. Both have preferences for using the C locale though:

  • iTerm: Preferences > Profiles > Terminal > Set locale variables automatically
  • Terminal: Preferences > Settings > Advanced > Set locale environment variables on startup

You could also add export LANG=C to your shell profile.

$ defaults read -g AppleLocale
ja_JP
$ locale
LANG="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_CTYPE="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_ALL=
$ dddd
-bash: dddd: コマンドが見つかりません
$ export LANG=C
$ dddd
-bash: dddd: command not found
| improve this answer | |
  • 1
    Yes, I noticed that. That seems wrong though, a locale is not a language. Just because I want my numbers to be formatted like this: 123.456,789 for 123 thousand... doesn't mean that I want my programs to be in Dutch. So this would appear to be a bug somewhere. – Wolph Feb 25 '13 at 10:43
  • 1
    @WoLpH a locale contains a language. – Gerry Feb 25 '13 at 11:22
  • 1
    @Gerry: I guess that works, I'll report it as a bug in iTerm2 in that case since it's not using the settings as defined in OSX. – Wolph Feb 25 '13 at 13:14
  • 1
    @Gerry: my Region (i.e. number format) is set to Dutch, my language (which is the locale according to you) is set to English. It seems that it is using the wrong variable in that case, is it not? – Wolph Feb 25 '13 at 14:47
  • 1
    @Gerry: I've added screenshots to clarify :) – Wolph Feb 25 '13 at 14:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .