3

I have a Mountain Lion macbook and it's default locale is english, it's keyboard is english (US) as well. I need to change the language that the terminal replies to Swedish.

For example, Instead of replying "Connection Refused" for a failed telnet, it should say "Forbindelse Vagras" (which is the Swedish translation)

EDIT: I have tried setting LANG=sv_SE.UTF-8 and same with LC_ALL, to no effect

Have also tried changing system-wide settings, which changes the language in the entire system but not the terminal

Also, I'm running ZSH.

migrated from stackoverflow.com Nov 15 '13 at 6:15

This question came from our site for professional and enthusiast programmers.

  • I don't think command-line tools like telnet are localized. – hamstergene Nov 6 '13 at 8:34
  • so i'll have to get extra language packs? – user2959177 Nov 7 '13 at 11:35
  • I don't think there are any extra language packs :) Everything is already shipped with OS X; these tools simply were never localized. The only command-line tool that ships some locale info is /usr/bin/cal; if you type LANG=sv_SE cal in Terminal you will get weekday names in Swedish. That's as far as you get. – hamstergene Nov 7 '13 at 11:55
  • Bah! Any ideas about other OSs? Windows, Ubuntu... I can install a VM and test what I need to. – user2959177 Nov 8 '13 at 13:02
  • Windows is definitely the best at this, all standard components should be perfectly localized, but it's command-line environment is not POSIX and lacking features to the degree of pathetic. Try also FreeBSD, RedHat/Fedora (you may need to install additional packages having "nls" in their name). – hamstergene Nov 8 '13 at 13:43
1

I imagine you'll want to set the LANG environment variable.

  • 1
    tried that... it shows LANG="sv_SE.UTF-8" LC_COLLATE="sv_SE.UTF-8" LC_CTYPE="sv_SE.UTF-8" LC_MESSAGES="sv_SE.UTF-8" LC_MONETARY="sv_SE.UTF-8" LC_NUMERIC="sv_SE.UTF-8" LC_TIME="sv_SE.UTF-8" LC_ALL="sv_SE.UTF-8" but the language remains stubbornly english – user2959177 Nov 6 '13 at 7:24

You must log in to answer this question.

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