Xcode using wrong localization - ios

I have two localizations in my project: Base (which is in English) and Swedish. When I set my phone to Swedish it works, and when I set it to English it works. But when I set it to another language, for example German, it uses the Swedish translations instead of Base. Any ideas why?

I found the answer. In the phones settings, you don't just set the current language, you set language priorities. So if you've had Swedish and switches to another language, Swedish will be second priority and English lower.

Go to your target and then to the Info tab. Under "Custom iOS Target Properties" you will find an entry with the name "Localization native development region". This entry determines which is the default language, the one displayed in case that there in no localization resource for the selected language. Make sure that the entry is set to "en".

Related

Localization in Swift, Base, German, English, what's the correct way to do it?

I have a project which is nearly completed.
The language I used in Storyboard and in code is German. I use Base localization (which is German because the Strings in Storyboard and Code are German). The App is also localized in English.
Basically I want that every non-German user can use my App in English but I also want to use German language in Storyboard and code.
For that, I set the Base localization to English (I set the language to "EN" in project.pbxproj, and I set the language to "United States" in the Plist file).
What I want is working but I think this is not the correct way to do it because in my current configuration Xcode thinks that my Base is English (because I set it to English) but in fact it's German.
If I would set the Plist file and the project.pbxproj file back to DE users which are not German and not English would have to use my App in German. Or am I wrong?
What's the correct way to achieve that German users can use my App in German and all others should see the English version.
I think you should set the base language to English, add German for additional languages, so the APP for any users uses German on the phone will display German. Otherwise, the APP for all users who do not use German will display the base language, which is English. I hope this will help you.
Check this to set up the development language on XCode.

Default language not working in iOS app

I have such problem:
I have localized my app for two languages - English and Polish, with English being set as the Base one.
I set developmentRegion to "en" (also tried "English") in both info.plist and project.pbxproj files.
My translated texts are contained within localized Main.strings and Localizable.strings files.
So everything should be fine, yet when I set any language other than Polish or English the app does not fall back to the Base (English) one, instead stays on the last used, supported language. (i.e. Polish if I recently changed from Polish to lets say French).
Can anyone help me ?
Ok I see now. I thought that whatever unsupported language I would set in system settings, my app would always revert to English (Base).
That's not true.
When selected language is not supported then the app is taking the language that is the highest on "Preferred languages" list in system settings. Only if none of these preferred languages is supported, then the base one is selected.

iOS - After changing the language does not apply default

I have two languages in my app, English - default and Swedish. When it is Swedish and I switch to the another (Ukrainian, Spanish) should go to the default - English, but still Swedish.
I found answers, first of all, your device looks at preferred language order and then at default language in a project.

IOS: set a default language in xcode for my app

I started my xcode project and I have these settings:
In xcode 5 it add this "base" language, but I don't understand how it works.
I want to set as my default language english and not italian; for example if an user set its device in spanish or in french language it must see app in english and not in italian;
can you help me?
thanks
SOLVED!!!
you should set "base" in in plist file section:
Localization native development region
and set Storyboard only for "base"; for other language only in Localizable String
when you localize a file you should set base (for language default) and the other language you want to use.
In localizations (picture in my question) should be with base and all language you want to use

Base localization not loaded keeps on last used one

I'm localizing my app to support English and Spanish.
If I set the device to Spanish and then I change to a non supported language, for example Italian or French, the app still shows the labels in Spanish. I'm not setting the values from code using NSLocalizedString. I'm localizing it in Interface Builder using the Main.strings file.
I have the Base localization in English, so it should show the content in English for other languages, but it’s not working. It keeps showing the last localization used.
Is this the correct behavior? How can I force it to use the Base localization when the language is neither English or Spanish?

Resources