Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone en_* sublanguage localization

I want to localize strings in my iphone app for en_GB and other 'en' sub-languages, but XCode and the iphone refuse to let this happen. I have created a localization of "Localizable.strings" for en_GB and en_US (I tried both hyphens and underscores) for testing purposes, but they just aren't recognized. The only language code that works is simply "en" (displayed as "English" in XCode).

I can't believe this isn't possible, so what am I doing wrong? I'm also hoping to get the typical 'cascading' behaviour where if a string isn't found in the sub-language e.g. "en_GB" then it should be taken from "en" if possible. Help?

like image 478
Mike Weller Avatar asked Jun 01 '09 11:06

Mike Weller


People also ask

Does Apple use localization?

In order to maintain its place as one of the biggest brands in the world, successfully leveraging its marketing localization services has been key. Apple has had to adapt its products and materials to fit global audiences, keeping in mind cultural and linguistic nuances.

How do I change my region language on my iPhone?

Change your phone's language iPhone: Go to iPhone Settings > General > Language & Region > iPhone Language. Select a language, then tap Change to {language}.


2 Answers

When you choose 'English' from the list of languages on the iPhone preferences, that actually means the 'en_US' language.

So until apple update their software with additional sublanguages like "English (British)" etc. we are left with going by the locale region setting, and loading strings manually from another string table.

However, the language and regional locale are separated for a reason: a Spanish user in the UK may want dates/times formatted according to the local customs, but program strings in their native tongue. It would be incorrect to detect the regional locale (UK) and therefore display UK strings.

So basically there is no way to do this currently.

like image 62
Mike Weller Avatar answered Oct 07 '22 19:10

Mike Weller


What you're doing should work according to the docs. But it appears that the iPhoneOS implementation is at odds with the documentation. According to Radar 6158876, there's no support for en_GB language, only locale (date formats and the like).

like image 40
Rob Napier Avatar answered Oct 07 '22 19:10

Rob Napier