Storyboard mirroring after localization in iOS - ios

I have an iOS app.
I started working on it without localization.
The app is RTL-language-oriented.
Now I wanted to localize the app so I created localization of strings.
I didn't add any storyboard localization.
But unfortunately, all the UI got mirrored.
I don't even have "main(base)" file
The question is -
Why is my UI NOT ignoring the language direction like it did before I started localizing? I expect the UI to ignore the language direction because I didn't add anything that should change the behavior it had before starting the localization.
(I know about the "right-leading left-trailing + respect language direction" ability of constraints, this is not my question)
Thank you!

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.

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

Mirror programming for uicontrols in xcode

I am new to multi-language app.
What I am doing is,
an app with two languages.
English & Arabic
The language of the app depends upon the device language.
(I want to change this too, that app language should be controlled from inside the app. not device dependant but thats next question)
I am having some controls like UIButton,UITextField,UILabel, etc....
When my app is in English I gave these controls frame starting from left corner of device, and when my app is in Arabic I gave them frames starting from Right corner of device. (As arabic is written from Right - to - left)
My Question is,
For this purpose I need to do extra work,
i.e. check device language and then set the frames of control.
on each view I may have "n" number of controls, and giving the frame sizes to all controls for both language doesn't seems good from my view.
Is there anything available in Xcode itself by using which I can do this.
means I need to give frames for default language (i.e. English) and if my device language is change to Arabic then frames of Controls will be automatically Mirrored from Right to left.
Following screens may give some idea.
(I used different frames for all those controls checking device language)
Any help is accepted.
Thanks in advance.
sorry If question is asked already. But I didn't find anything.
If anyone found then link to that is Welcome :)
From Supporting Right-to-Left Languages:
Your user interface should be mirrored when displaying right-to-left languages. If you use base internationalization and Auto Layout, most of the user interface will appear mirrored automatically for you. The text direction changes to right-to-left with the exception of phone numbers and country codes which are always left-to-right. Some views and controls in your user interface may not change direction automatically which you can fix programmatically.
They functionality you're looking for is called Auto Layout which was introduced a few years ago by Apple. It will handle lots of things you need, but there's also a lot to do for you. The guide above will guide you through the necessary steps.
Update from iOS 9.0:
iOS 9 brings comprehensive support for right-to-left languages, which makes it easier for you to provide a flipped user interface. For example:
Standard UIKit controls automatically flip in a right-to-left context.
UIView defines semantic content attributes that let you specify how particular views should appear in a right-to-left context.
UIImage adds the imageFlippedForRightToLeftLayoutDirection method, which makes it easy to flip an image programmatically when appropriate.
To learn more about providing a flipped user interface, see Supporting Right-to-Left Languages.

How to localize iOS 8 Today Widget?

I am trying to localize my iOS 8 Today center widget.
I have a storyboard specifically for the widget and hit the localize button and selected Spanish. The same way I localized the normal part of the app. As you can see here:
The files have the following settings with Target Membership set to my extension:
No matter what I try (using .strings or individual .storyboards for each language or even setting the NSLocalizedStrings through code), I cannot get the language to show up correctly localized in the notification center widget. Everything works as expected in the regular app. Anyone have any experience or thoughts? Thanks!
For those experiencing the same problem, I had to delete the storyboard and rebuild a new one. Localizing this seemed to work.

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?

Resources