From e05f0a45f6f3e5bf86ef723b20faeadd5cb9471e Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 12 Feb 2025 02:18:51 +0100 Subject: [PATCH] Improve documentation on forcing right-to-left layout in Control --- doc/classes/Control.xml | 2 +- doc/classes/ProjectSettings.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 3e648127416..5ef0b2b5378 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1372,7 +1372,7 @@ Automatic layout direction, determined from the parent control layout direction. - 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. + 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 (unless said language is configured as a fallback in [member ProjectSettings.internationalization/locale/fallback]). 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. Right-to-left layout direction can also be forced using [member ProjectSettings.internationalization/rendering/force_right_to_left_layout_direction]. Left-to-right layout direction. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 9c9c6d6f5cf..aa7ec03b5f5 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1480,7 +1480,7 @@ The expansion ratio to use during pseudolocalization. A value of [code]0.3[/code] is sufficient for most practical purposes, and will increase the length of each string by 30%. - If [code]true[/code], emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. + If [code]true[/code], emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. See also [member internationalization/rendering/force_right_to_left_layout_direction]. Replace all characters in the string with [code]*[/code]. Useful for finding non-localizable strings. @@ -1502,7 +1502,7 @@ [b]Note:[/b] This property is only read when the project starts. To toggle pseudolocalization at run-time, use [member TranslationServer.pseudolocalization_enabled] instead. - Force layout direction and text writing direction to RTL for all controls. + Force layout direction and text writing direction to RTL for all controls, even if the current locale is intended to use a left-to-right layout and text writing direction. This should be enabled for testing purposes only. See also [member internationalization/pseudolocalization/fake_bidi]. If [code]true[/code], root node will use [constant Node.AUTO_TRANSLATE_MODE_ALWAYS], otherwise [constant Node.AUTO_TRANSLATE_MODE_DISABLED] will be used.