Reputation: 1615
I updated my Xcode to 14.1. but when I want to add a language in Setting, it stays on this page and I can't do any thing.
All I can do is Erase All content and Setting to return to normal state. It works on my MacBook Air M1, but no on my MacBook Pro 2019 Intel i7
Upvotes: 9
Views: 1495
Reputation: 1121
It works on M1/M2 but it doesn't on Intel. You can use the command line tool simctl
as a workaround.
To set the preferred language to e.g. "German" use the following command:
xcrun simctl spawn <UUID> defaults write "Apple Global Domain" AppleLanguages -array de
To change the region use:
xcrun simctl spawn <UUID> defaults write "Apple Global Domain" AppleLocale -string 'de_DE'
Replace <UUID>
with the UUID
of the device you want to change. To get the currently booted device(s) use:
xcrun simctl list 'devices' 'booted'
After you have changed language and/or region you need to shutdown and reboot the device like this.
xcrun simctl shutdown <UUID>
followed by xcrun simctl boot <UUID>
If you only want to change the currently booted device(s) you can just use 'booted'
instead of the UUID. Like so:
xcrun simctl shutdown 'booted'
So, to change the preferred language of the currently booted device(s) to English, just use:
xcrun simctl spawn 'booted' defaults write "Apple Global Domain" AppleLanguages -array en
To change language and/or region the desired device(s) must be booted.
Upvotes: 7