Open squarefrog opened 3 years ago
If I use the Simulator's Settings app to set my language to English (UK), then the .GlobalPreferences.plist contains the following:
.GlobalPreferences.plist
<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.
NSLocale.isoLanguageCodes
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:
.isoLanguageCodes
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
If I use the Simulator's Settings app to set my language to English (UK), then the
.GlobalPreferences.plist
contains the following:The
NSLocale.isoLanguageCodes
array, doesn't include this value (shown below), therefore it isn't possible to select UK English in ControlRoom.I thought about just injecting this value into the
.isoLanguageCodes
array, however this presents a further problem: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)...