How to change app language at runtime for Storyboard strings? - ios

I'm trying to implement language switcher which will change app language without app restart. Found a solution for text inside code, basically a replacement for NSLocalizedString macro, but there is also text inside storyboard in Main.strings, which is not affected. Any suggestions?

Related

Why is my main storyboard not picked up for localisation when I add a new language?

I am starting to localise my app to other languages but when I add a new language in Xcode 9, only my launch screen storyboard is picked up for localisation not my main storyboard, I had expected both to be picked up for localisation, how do I get my main storyboard included for localisation?
Select your storyboard -> In file inspector there is a button "Localize", i believe that is what you need.
I wouldn't recommend localizing your app using Storyboard.
Why: In future, you won't be able to send a storyboard to the interpreter to translate it. It's slower and heavier. It takes more time.
Instead, there is another solution. Use NSLocalizedString to do localization. Then you will generate the file with translations and have 1 file for 1 language of the app. It's a common practice among developers and I always have been doing it that way.
Check out this tutorial it seems to be good from what I've looked through: link.

iOS UI hang when change language from app setting

Dallini UI Reflection Issue -
We are developing a multilingual app, where we need to support English and Arabic Languages, Application also provides an option in setting to change their language preference independent to what they have chosen in Settings of their iPhone. Considering Arabic is right to left language different to English, we are using the following code to change the navigation and UI flow.
UIView.appearance().semanticContentAttribute = .forceLeftToRight or UIView.appearance().semanticContentAttribute = .forceRightToLeft
However Our Application is lagging and behaving very slow in transition and Table Scrolls just after using this above code. We also tried commenting the above line just to make sure that this is the very same line which is creating this issue. We have also used the analysing tools and saw that after using this code It Increases the over all memory Utilisation.
Please suggest with the correct method/option to be used here as we already achieving the localised String file to manage the content in the application but we also need to reflect the UI and navigation according to the language preference he/she has set on the application independent of what is there in the settings.

How to localize system buttons into the app?

My app uses custom localization for interactive language changing. The solution can be found here.
The problem is that the default view controllers (like AVPlayerViewController, SFSafariViewController etc.) localize the buttons ('Done', 'Cancel' etc.) based on the device language.
I tried adding to localization files the custom localization for 'Done' string but it doesn't work.
I do not want to have my app localized in German and SFSafariViewController localized in English (device language).
If you have met the problem like this one please give me your solution.
Thanks

IOS keyboard different language than IOS language

Currently I'm working on a Phonegap project which is in Dutch (dit not define a language in the App yet), also the OS is in Dutch.
Now my problem. When I open the keyboard or the camera I see a Done, Prev, Next button in English. Which should be in Dutch.
I have read multiple posts about the CFBundleAllowMixedLocalizations var, but don't know how to add this property in the info tab of my project. And will this solve my issue?
Also I have read that you can add a Language file, but I just want to have the IOS language inside this buttons. Any way to do this?

Autolayout with localization without restarting the app

My app supports both Arabic and English version and Autolayout handles alignment of text and UI elements. But a feature I need to add is a language switch button that immediately changes the language. I even need autolayout to adjust as per the language but doesn't seems to take effect unless the app is restarted. Any suggestions how to achieve this functionality.

Resources