I bet you thought this would be the article where I showed you how to make your computer curse more. Well, language can mean much more than that. In fact, Apple has dedicated a whole binary to switching your default language in OS X, in languagesetup. This command, located at /usr/sbin/languagesetup, is capable of changing the default language used by a system to a number of different languages. There are other ways to accomplish this, but none quite so easy. To get started, note that there are two ways to run languagesetup. The first is interactively, which I mostly use to figure out what I actually want to do with it. The second is using a standard command prompt, which I use for scripting.
Let’s start with the interactive. Simply run the command with no operators/verbs/whatevers:
languagesetup
This outputs a list of the languages that can be used in this way. Note that number 7 is Spanish.
WARNING: root access required to change system language
1) Use English for the main language
2) Utiliser le français comme langue principale
3) Deutsch als Standardsprache verwenden
4) 以简体中文作为主要语言
5) 以繁體中文作為主要語言
6) 主に日本語を使用する
7) Usar español como idioma principal
8) Usa l’italiano come lingua principale
9) Gebruik Nederlands als hoofdtaal
10) 주 언어로 한국어 사용
11) Usar português do Brasil como idioma principal
12) Usar o português europeu como idioma principal
13) Brug dansk som hovedsprog
14) Käytä pääkielenä suomea
15) Bruk norsk som hovedspråk
16) Använd svenska som huvudspråk
17) Сделать русский язык основным языком системы
18) Użyj polskiego jako języka głównego
19) Ana dil olarak Türkçe’yi kullan
20) استخدام اللغة العربية كلغة رئيسية
21) เลือกภาษาไทยเป็นภาษาหลัก
22) Vybrat češtinu jako hlavní jazyk
23) Magyar kiválasztása alapértelmezett nyelvként
24) Seleccioneu el català com a idioma principal
25) Odaberite hrvatski kao glavni jezik
26) Επιλέξτε Ελληνικά ως την κύρια γλώσσα
27) בחר/י עברית כשפה ראשית
28) Selectați româna ca limbă principală
29) Vybrať slovenčinu ako hlavný jazyk
30) Вибрати українську основною мовою
31) Gunakan Bahasa Indonesia sebagai bahasa utama
32) Gunakan Bahasa Melayu untuk bahasa utama
33) Sử dụng Tiếng Việt làm ngôn ngữ chính
34) Utilizar español de México como el idioma principal
At this point, you could just use the number 7 key (if we were root) and switch the default language of the system to Spanish. But, we’re going to go ahead and do that in a non-interactive fashion, using the langspec option:
sudo languagesetup -langspec 7
Or to switch it back, note that English is first:
sudo languagesetup -langspec 1