Localization in an iOS app - ios

I am trying to localize my iOS app. However, I do not have translations for all the languages supported by Apple. I have translations for French and Dutch, with English as the base language. I wanted to know the common behavior in the following scenario.
Suppose I set the iPhone language to French and then navigate to the app. I am able to correctly see all the translations.
Now, I set the iPhone language to Portuguese. Now when I navigate to the app and I see the translations are still in French and not in English (the base language of my app).
Is this behavior right? Shouldn't the language be set to English?

The language fallback is in the Settings app. It defaults to languages the user has set the phone to in the past -- they can change it in iOS 9.

Related

Apple Watch uses localization language as base language

I have added Chinese (Simplified) localization to my app, while English is set as Development language. Both iOS app and Watch App, as well as Watch Extension have necessary localization files set up:
iOS:
Watch App:
Watch Extension:
All three Info.plist files have
<key>CFBundleDevelopmentRegion</key>
<string>en_US</string>
as suggested in this post.
When I run the app on iPhone, everything works well in both English and Chinese system languages. Also, if I set a third language for system (e.g. Russian), iOS app gracefully falls back to base English (suggesting it's closest in preferred languages list).
Watch app also works ok in cases when Watch language is set either to English or Chinese. But should I set third language for the Watch - it falls back to Chinese, not English.
What am I missing here?
You need to add Localizable.strings (Base) file in Watch Extention. Please check the forum post.
https://forums.developer.apple.com/thread/86889

iOS Localization: simulator behaves differently than device

I have set up 2 languages in my app:
English (development language)
Italian
I am expecting that in case the device is set to a language different than Italian, the app would come up in English.
However I noticed an inconsistency, between simulator and device:
If I set the simulator to Spanish, the app comes up in English
If I set the device to Spanish, the app comes up in Italian
how can I make sure the app comes up in English when the device language is set to Spanish?
I believe this inconsistency is due to the preferred language order in Setting App -> General -> Language & Region. Your iPhone device is likely to have ordered Italian with higher preference.
As stated in Apple's documentation (https://developer.apple.com/library/ios/qa/qa1828/_index.html)
To determine the language for your app, iOS considers not only the order of the user language preferences (in General > Language & Region of the Settings application) but also the localizations your app declares it supports. Here is the detailed process:
iOS first looks up your user's most preferred language, which is the first entry in their language preferences.
It proceeds to check if that language is supported by your app. iOS searches your app bundle for an .lproj folder matching the preferred language. If the folder exists, iOS infers that your app has been localized for that language and chooses it for your app. Otherwise, iOS selects the next language in the user language preferences, then repeats the above check.
The dialect support in iOS may slightly change the above behavior. If your user's preferred language is a regional variant that is not supported by your app, iOS will try to fall back to a more generic language before giving up. For example, if your user's preferred language is British English and your app bundle doesn't contain an en-GB.lproj or en_GB.lproj folder, iOS then searches your bundle for an en.lproj folder and chooses English for your app if the folder exists.
If none of the user’s preferred languages are supported by your app, iOS chooses the language matching your app's development region (CFBundleDevelopmentRegion).
In Summary,
a. For user who knows both Italian and English, it will display in their
preference.
b. If they only know one of the two, it will display the correct one.
c. If they don't know both, you should set CFBundleDevelopmentRegion in your info.plist to select English.

CFBundleDevelopmentRegion doesn't work while setting not supportive language

I'm designing an app which supports English, German and Simple Chinese(The app default is English).
However, while I set a language (like German, supportive language) to launch my app, it's normal. Then I set another language (like Korean, not supportive) and launch the app. The app still shows German version but English.
I'm pretty sure my CFBundleDevelopmentRegion is set en.
What to do to make the app show English version in other language?
I found the solution by myself.
First, go to info.plist to see CFBundleDevelopmentRegion
Before Xcode 7, we only need to choose the language as below.
enter image description here
We want English to be default language. Then we set "en".
However, Xcode 7 update Localization choices for same language.
Like en-UK and en-US are actually English.
So just choose the Localization wiz country
enter image description here
I choose United State then the bug is solved.

(Base) localization not working in iOS 7?

It seams base localization does not work on iOS7?
I have an app (its available on the app store) that has localisations for Dutch, Chinese and a base localization = English. This looks like this in xcode 6:
The plist file contains the "Localization native development region" key:
Problem:
When the app runs on on iPhone iOS7 configured for English, it
uses the Dutch localization ?! I would expect that iOS uses the base
localization since its configured as English?
I do not have a "development language" entry in the Localizations
section of Xcode, I have seen this in some posts, what is the meaning of this "development language"? And could this be a possible cause or something?
I can solve the problem by adding an localization language "English" (which then seams to become the development language, I have tested this) but this would simply be a duplicate of my "base" language. Surely this is not the way to go?
I know there are many topics on localizations already but I have read them all (I believe) and cannot find a clear answer.
1.Localization native development language states the preferred language to be use if the iOS language and your app languages doesn't match, so I'm thinking about a storyboard that has been localized in english and a strings file in english, to make your app use english language.
2.Development language is not the same of the first point, is the base language, by default is set to english and it doesn't seems to exist a clear way to change that (I've filed a radar to Apple about it asking for xcode to show a menu at the beginning of each project). To change it you need to do it manually, but appstore will always show english as language
3.This is the solution, when iOS doesn't find a suitable localization it iterates through an array of laguages until it finds an existing one, if you add an english localization you could solve the problem.
Appstore reads directories in your app bundle

How do I set the default locale in xcode 5 and ios 7?

I know this is an already asked question, but no one of the answers helped me.
I'm writing an iOS app localized in italian and english.
I've already done two storyboards and two Localizable.strings file for the texts.
Now, if I set the english language on the phone, the app picks the english files, if I set the italian language on the phone the app picks the italian files.
But if I set french language(or spanish, or german), the app picks the italian files, which is wrong, how can I set english as the default language?
An iOS device keeps track of which languages you have set the locale to. If the currently selected locale is unsupported in an app, then the device will use the last user-selected language you used that is supported by the application.
So for example, imagine you had changed your device to English, then Italian, then Spanish. The app would first try and provide a Spanish localization. If one wasn't available, it would attempt Italian. If that wasn't available, then it would finally use English.
If you view the list of languages in the device's Settings, you'll see that they're ordered by 'last used'. I'm not aware of any way to alter this (seemingly intentional) feature.

Resources