Category filter
Script to change system language on Mac
Your macOS device may have been configured to display the language of the region where you purchased it. However, you can choose a different language so that the users view the menus and dialogues appearing in the system in their preferred language. Here’s a custom script to change the system language on macOS devices. Use Hexnode’s Execute Custom Script action to execute the scripts.
Change default system language
First, fetch the languages supported on the device, executing the following command on the device displays all languages supported by it.
1 |
languagesetup |
You can then execute the script to change the system language to any preferred language supported on the device. Here in this script, the defaults write
command takes in two parameters, a primary language (de) and a secondary language (en), as language designators and then changes the system language to the primary language. If the primary language is not supported, the secondary language is used as a system language. You can specify the primary and secondary languages as per your choice in the defaults write
command. The script takes effect for the currently logged-in user.
1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/bash CURRENT_USER=`stat -f%Su /dev/console` #Change system language sudo su $CURRENT_USER -c "defaults write -g AppleLanguages -array de en " |