3

I'm using Bash 5.1.8 from MacPorts as my shell. For some reason Bash is part French and I can't figure out why. Launching Terminal.app with "Set locale environment variables on startup" checked, I get this output from various commands:

$ locale
LANG="en_CA.UTF-8"
LC_COLLATE="en_CA.UTF-8"
LC_CTYPE="en_CA.UTF-8"
LC_MESSAGES="en_CA.UTF-8"
LC_MONETARY="en_CA.UTF-8"
LC_NUMERIC="en_CA.UTF-8"
LC_TIME="en_CA.UTF-8"
LC_ALL=

$ printf '%(%A %d %B %Y)T\n' Saturday 13 November 2021

$ asdf -bash: asdf : commande introuvable

$ help printf printf: printf [-v var] format [arguments] Formate et affiche des ARGUMENTS en contrôlant le FORMAT.

Options :
  -v var    affecte la sortie à la variable VAR du shell plutôt que de l'afficher
        sur la sortie standard

...

All internal Bash messages are showing as French, but when internal Bash commands use system libraries to generate output they get the right locale (as in printf above which is a Bash builtin but uses the strftime library to output.) Unchecking the above box in Terminal preferences reverts locale to the default "C" but gives the same behaviour.

System locale info looks like this: screenshot of language and region preferences

How can I get the right language set?

miken32
  • 1,176

0 Answers0