xcode - How to find iOS locale hierarchy -
the ios system automatically picks suitable available localization app. instance, when user's locale en-in
app offers en-gb
, that'll act fallback (as explained here).
my question is: possible these hierarchies somewhere?
the reasoning behind question that, instance, may have translations in es-co
, es-cl
, es-pe
, ... identical , instead of including separate string files of them, i'd provide them 1 common fallback locale. know use es-419
in exemplary case might not obvious in other scenarios.
answering myself here:
bundle.preferredlocalizations( from: ["es", "es-419", "es-ar", "es-cl", "es-co", "es-mx", "es-pe"], forpreferences: ["es-pe"])
returns ["es-pe", "es-419", "es"]
means peruvian spanish fill fall es-419
, es
in order.
Comments
Post a Comment