An iOS app has a Localizable.strings
file for a language with region, es-MX
(Spanish-Mexico), but no general localization file for that language, e.g. es
(Spanish).
Will users with device locale es-PE
(Spanish-Peru) see the es-MX
translation or will it fall back to the base language en
?
I tried it out on the simulator with iOS 10.3 and the result is:
If an
es-MX
translation exists, but noes
translation, then theLocalizeable.strings
for a user with localees-PE
fall back to the base language, in my caseen
.If anyone has a reference to the docs please comment and I will add it to the answer. Because if the behaviour is currently not defined it may change for future iOS versions or it may even depend on the language and region. There are regions that would qualify as "parent" for other regions, e.g.
es-419
(Spanish Latin America) fores-MX
(Spanish-Mexico), so it would be interesting how the fallback behaviour is defined.However since
es-419
is a distinct language one can choose in the iOS settings I assume the fallback hierarchy is: