Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set UK English for Language #125

Open
squarefrog opened this issue Feb 26, 2021 · 1 comment
Open

Unable to set UK English for Language #125

squarefrog opened this issue Feb 26, 2021 · 1 comment

Comments

@squarefrog
Copy link

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)...

@Mcrich23
Copy link
Contributor

In order to do this, just change the locale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants