I have a problem that the position of a button \ image is changed according to the language localization.
e.g. in Hebrew the alignment is right-to-left in opposite to English.
this causes the buttons \ images to be positioned on the other side of the screen, in oppose to English position.
how do I disable ios from re-positioning the buttons (according to localization)?
How many languages are there for localization in your application?
If you think that there are more problems in UI then create separate .xibs file for separate localization.
Please check the link. This will help you.
https://www.clairereynaud.net/blog/getting-your-iphone-app-ready-for-localization/
I've found a simple way for doing this:
go to the controller you want to fix it's position, and select it's constraints.
set Direction property to "Left to Right" instead of Leading to Trailing".
Related
When our app runs in a right to left language like Hebrew or Arabic, the SwiftUI views automatically flip the positions of our views to be right to left. Some of this is very helpful, but certain views should not be flipped.
We tried .flipsForRightToLeftLayoutDirection(false) on the views but this didn't prevent them from being positioned differently when running with the scheme set to Hebrew or Arabic.
Would appreciate any help. Thank you!
You can force the layout direction using .environment:
.environment(\.layoutDirection, .leftToRight)
I have a large multi language app that does not have auto layout yet. The app contains many default tableview cells. In Arabic the app stays left to right and only uses the arabic localized strings. Is there a way to turn off this new right-to-left support so that default tableviewcells and navigation controller buttons are not flipped?
I know this approach via autolayout... in autolayout you can disable right to left change by selecting particular constraint and in property inspector untick the lable which says respect language...
Would someone be so kind telling me how would you set a constrain (using size classes) for a view to be right above the keyboard (without the predictive part) on iP6 and iP6+ like on the photo below?
May I have a sample project?
Thank you
Either add the constraints in programmatically based on the keyboard size, or make separate interface files for every screen size with a fixed constraint based on a known size for the keyboard for that screen.
Below is a link to a chat application that works from the same premise. When the keyboard is active elements are pushed up so they aren't hidden by it.
https://github.com/oseparovic/MessageComposerView
The application is in Objective C and pretty easy to transfer that section of the app, I've used this myself.
So, i've been looking anywhere an explanation about how to implement Mirroring on Storyboard's Auto Layout - not programmatically.
I have an app that support a few languages and when i turn the language to Hebrew, for example, i have a label that change it's text to hebrew. so far so good. what i want to do next is to change the label's place like a mirror.
Can anyone help me understand how to do it on Storyboard Auto Layout?
Thanks.
After doing some research, i found the answer:
First, you have to implement an Internationalization. you can follow Ray's Wenderlich tutorial for Internationalization by enter this link:
http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014 .
Now, on Storyboard, all you have to do is putting some constraints to your label:
put trailing and leading constraints to the label you want to reflect like a mirror when the user switch the language, and that's it.
It's much more easy then design a new Storyboard and you're using the elements that Apple gave you, so i guess it's the right way too.
Hope it helps.
I am working on an application, where I have to implement arbic as well as english locale.
I have made seperate storyboards for both languages. Problem is autolayout constraints are automatically flipping my views. Is there anyway to stop auto flipping for arabic locale?
I want to design views myself for arabic.
Thanks
Constraints by default respect language direction, but you can turn this off by selecting the constraint, and then in the Attributes Inspector, unchecking the Respect language direction in the First Item and the Second Item pop down menus.
Note that that option isn't available for all constraints.