iOS Localization: simulator behaves differently than device - ios

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.

Related

iOS App Default Language

I have an app that support both Chinese and English, and when my phone is configured to Chinese or English, things display quite normally, but when my phone is in French(by default the interface would be in English), everything is in English EXCEPT the UIActivityViewController is in Chinese that will pop up once user click a "share" button in my app.
I do not know how to modify this, any helps will be appreciated.
Note: my app uses a Localize-Swift library which allows user to choose a desired language from the settings within the app which means the app language could be different from the system language, if user chooses one from the app then switch to another system lang. Also, English IS set to be the development language in Xcode and Base Localization is NOT used.

Localization in an iOS app

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.

Build Settings : What changes should I do in the build settings so that on releasing the app it will show the languages on App Store as only English?

I have committed some kinda mistake in uploading an iOS app, which makes my app show the languages as English and German on AppStore.
The scenario is that I have set the "Localization native development region" key in (info.plist of target) to Germany, while my app is actually an English app(for all territories). But I am not confirmed that changing this key to US, can change the Appstore language of the app to only to English.
Besides this, I have also set the language in Localizations in the( info of Project) to:
1. English - Development Language
2. German
What changes should I do in the settings so that on releasing the app it will show the languages on App Store as only English?
After doing an experiment with uploading an application to app store, I came to know that for the languages of the application we need some settings changes in the info.plist of the project(remember not the target).
For eg. For Multilingual(English and German both) apps. It should
show only these two languages in the App Store. Otherwise the user might get irritated after downloading the app when he see the content is in single language.
Just go in the localization as shown in screenshot above and click on + to add
a language and - to remove the language.
Also this localisation language setting creates a folder named "de.Iproj" or "en.Iproj" for respective languages. That folder must also be removed from the build if the corresponding language localization does not exist

How does an iOS app know the final user's language choice?

Let's suppose we've translated our application to a new language and we have the localization files in our project.
Now, how is the app going to know the language of the final user?
Is the app going to change the language depending on the settings of the iPhone/iPad?
The app determines which language to use based on the Region and Language set up by the user.
iOS 13 and newer support language selection on a "per app" basis.
Apple Developer News: How to support per-app language settings in your app
Although, I have noticed the "per app" language selection capability may not itially be visible to the user ...
Starting with iOS 14, if a "per app language setting" via the Settings app is not accessible, then some second language for the device in Setting > General > Language & Region needs to be added. After any second language is added at the device level, then all language choices for the app are visible in the Settings > Some Example App > Preferred Language section.

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