Setting up iOS device / simulator to retrieve en_150 as locale

178 views Asked by At

How do iOS apps evaluate to a specific Locale?

Regarding Apple Docs, it follows standardized way (CLDR) with apple customized fallback strategies.

In Swift, I'm trying to figure out how Locale.current.identifier or Objective-C equivalent specifically output:

  • en
  • en_150
  • es
  • ...

(Without having a region designator)

How do I configure the simulator or device to achieve this?

What else influences Locale.current?

  • preferred language(s) (also the order)
  • selected region
  • supported languages from your app
  • (some other settings like calendar, phonebook collation) these are suffixed with an @

Interesting sources:

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html

https://opensource.apple.com/source/ICU/ICU-57131.0.1/icuSources/common/unicode/ualoc.h.auto.html

https://forums.developer.apple.com/thread/71383

0

There are 0 answers