ControlRoom
ControlRoom copied to clipboard
Unable to set UK English for Language
If I use the Simulator's Settings app to set my language to English (UK), then the .GlobalPreferences.plist contains the following:
<key>AppleLanguages</key>
<array>
<string>en-GB</string>
</array>
The NSLocale.isoLanguageCodes array, doesn't include this value (shown below), therefore it isn't possible to select UK English in ControlRoom.
let english = NSLocale.isoLanguageCodes.filter { $0.hasPrefix("en") }
print(english) // ["en", "enm"]
I thought about just injecting this value into the .isoLanguageCodes array, however this presents a further problem:
let enGB = NSLocale.current.localizedString(forLanguageCode: "en-GB")
print(enGB ?? "Unknown") // English, not English (UK)
I wonder if this does imply there is a better option for generating the drop down list of languages?
As a side note, I was surprised by the inclusion of Klingon (tlh)...
In order to do this, just change the locale