Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the behavior of Control.layout_direction in the documentation #102716

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Feb 11, 2025

@Calinou Calinou requested a review from a team as a code owner February 11, 2025 15:51
@Calinou Calinou force-pushed the doc-control-layout-direction branch from 1907aa4 to c7e0e2c Compare February 11, 2025 15:53
@Calinou Calinou requested a review from a team as a code owner February 11, 2025 15:53
@Calinou Calinou force-pushed the doc-control-layout-direction branch from c7e0e2c to 8217cda Compare February 11, 2025 15:54
@AThousandShips AThousandShips added enhancement documentation cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release labels Feb 11, 2025
@Calinou Calinou removed the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Feb 11, 2025
@Calinou Calinou added this to the 4.4 milestone Feb 11, 2025
@Calinou Calinou force-pushed the doc-control-layout-direction branch from 8217cda to 65c795e Compare February 11, 2025 15:56
@@ -1372,7 +1372,7 @@
Automatic layout direction, determined from the parent control layout direction.
</constant>
<constant name="LAYOUT_DIRECTION_APPLICATION_LOCALE" value="1" enum="LayoutDirection">
Automatic layout direction, determined from the current locale.
Automatic layout direction, determined from the current locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew., but only if a valid translation file is loaded for the given language. For all other languages (or if no valid translation file is found by Godot), left-to-right layout direction is used. If using [TextServerFallback] ([member ProjectSettings.internationalization/rendering/text_driver]), left-to-right layout direction is always used regardless of the language.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but only if a valid translation file is loaded for the given language

After #102649, it's also possible to set internationalization/locale/fallback to RTL language without translation files (if it's the only supported language).

There's also internationalization/rendering/force_right_to_left_layout_direction property for testing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops I overlooked this when merging. That can be improved in a follow-up.

Copy link
Member Author

@Calinou Calinou Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akien-mga akien-mga merged commit 4f137bb into godotengine:master Feb 11, 2025
20 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the doc-control-layout-direction branch February 12, 2025 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherrypick:4.3 Considered for cherry-picking into a future 4.3.x release documentation enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running a project with a RTL language set to internationalization/locale/test does not flip GUI to RTL
4 participants