hasan
hasan

Reputation: 24195

Auto RTL, LTR constraints behavior

Leading and Trailing constrains behaives depending on device langauge direction. To create an app that only support english requires to select every trailing/leading constraint and disable the respect language direction features. that converts the constraints to left/right constraints.

I remember that I used to disable creating leading/trailing constraints by default. instead, my constraints created as left/right constrains by default.

I am not quite sure how I used to do that. I thought that its related to the Use Base Internationalization feature in the project general settings. That didn't work.

I remember before that the project by default disables the Use Base Internationalization feature in older xcode versions. now its enabled by default.

Any idea how I can automatically force left/right constraints instead of leading/trailing constraints?

Edit: I just run an app that use base internationalzation and the constraint is leading/trailing and it didnt go RTL even that the device language is Arabic!

Upvotes: 1

Views: 1169

Answers (1)

user242849
user242849

Reputation:

As long as you only support English as a localization in your project, there should be no work needed to guarantee that your app will always be LTR, even with leading/trailing constraints.

Screenshot of an Xcode project highlighting the "Localizations" section of the Project inspector, showing English as the only supported language, even with Base internationalization turned on.

Upvotes: 2

Related Questions