Base localization not loaded keeps on last used one - ios

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?

Related

How to set base app language is Chinese Traditional in Xcode?

I need to set base language to Chinese, not English.
When I change device language to Japanese, the app also show Chinese, not English.
So, I open project.pbxproj and change developmentRegion to Chinese.
And also set Localization native development region in info.plist to China.
I run my app, the language also show English.
Have any idea to set base language?
Take Objective-C as example
Basically the localization form is NSLocalizedString(<#key#>, <#comment#>)
If you want your basic language is Chinese, then you should take the Localization key as Chinese instead of English. for example NSLocalizedString("你好", nil)
You will get "Hello" when App Language is English if you have specified some language, eg. English, in Localization file as "你好" = "Hello", if not, you will get "你好" by default.

iOS app picks up secondary language or Spanish as the main language even though phone's primary language is English

I am having a strange bug where in iOS is picking up the second preferred language on the phone as the main language and showing the strings in that language. I use react-native and it started to happen after I upgraded to 0.64.0. For example, in the below screenshot, the month strings are shown in Hindi. Hindi is the second preferred language on the phone.
The Cancel and Select buttons are added by JS side code which appears fine in English language. After I removed Hindi as the second preferred language leaving only English as the phone language, the month string started to appear in Spanish.
I am not sure what is triggering it and how to fix this problem. Any kind of help is much appreciated. I provide Hindi and Spanish translations for the app and have InfoPlist.strings file present for Hindi and Spanish in the app. If I remove those string files, then the strings are shown in English as expected.
Please note that the problem is not limited to the date picker. It is for any of the dialogs shown by iOS. For example, if I select any text, the copy label appears in Spanish. I have attached some other screenshots where the problem can be seen.
Open the Settings app.
Navigate to a--name > Preferred Language > Language.
Change the preferred language to Spanish.
also try setting the preferred language to just English and forget the Hindi and let us know what happens. also good chance this might fix you up:https://github.com/formatjs/formatjs

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.

Set English as default language in Localization iOS, Swift

getting issue here:
How to set English as default language for non-implemented languages in MultiLingual app. If changing language to e.g. Hrvatski or Polish which are not implemented the App does not use English as default language but seems to remember the last language used like(Dutch) in my case it continues to use Dutch…
How to set back to English is app does not support to Phone selected Language.

Resources