RTL Localization Support Questions in UMG/Slate

Hi,

We are currently adding localization support to our application and have encountered some challenges with RTL (Right-to-Left) handling. We’re unsure how to proceed in certain cases and would appreciate clarification.

1. Layout Components and Flow Direction

We’ve noticed that several layout components appear to ignore the flow direction, such as:

  • Canvas Panel
  • SizeBox (slot padding)
  • GridPanel

Are these components planned to be updated to use the new RTL helper functions in Slate, or will they not support RTL in the future? Should we assume that only certain containers, such as HorizontalBox and VerticalBox, will provide proper RTL support?

2. RTL Text Alignment Options

Currently, text in UMG follows the flow direction of the text content itself. However, we would like more flexibility, particularly for scenarios like lists containing both LTR and RTL items. Ideally, we’d like to see alignment options such as:

  • Left/Beginning (Culture) – Align to the start side based on culture/UI alignment
  • Center – Centered regardless of culture or text direction
  • Right/End (Culture) – Align to the end side based on culture/UI alignment
  • Left/Beginning (Text) – Align to the start side based on the text’s own direction
  • Right/End (Text) – Align to the end side based on the text’s own direction

While we can approximate some of these behaviors using ETextJustify::InvariantLeft and InvariantRight, native support in UMG would be preferable. Could you provide guidance on whether these enhancements are planned, and if there are recommended best practices for achieving consistent RTL support in the meantime?

Thank you,

Benjamin

[Attachment Removed]

Hello [mention removed]​,

1. To clarify, your assumption is correct that Right-to-Left support predominantly exists at the text widget level, and not at the layout component level.

Based on my findings, panels like CanvasPanel, SizeBox and GridPanel don’t apply text flow direction to layout by design as they use fixed or index-based positioning. They’re not meant to interpret the “start” or “end” side, so we generally shouldn’t expect them to gain Right-to-Left flow support with helper functions in Slate.

Therefore, to achieve UI mirroring, you should structure your UI hierarchy so that text widgets are parented under containers that do respect text flow, i.e. HorizontalBox or VerticalBox.

2. For lists containing both Left-to-Right and Right-to-Left items, I’d advise you to use separate Text Widgets and control their alignment dynamically based on culture, UI alignment and the text’s own direction as you described.

Query culture and flow direction with:

FInternationalization::Get().GetCurrentCulture()->IsRightToLeft() Detect text’s own direction using:

	ETextDirection ComputeTextDirection  
 
(  
 
    const FText & InText  
 
) 

And then set desired justification accordingly.

Let me know if this helps and don’t hesitate to ask if you need further assistance.

Best regards,

Tadas

[Attachment Removed]

Thanks for the reply Tadas!

  1. I kind of understand the reasoning, but stuff like tables, padding etc should all be flipped with proper RTL support. This basically means that we have to create a layout which is only based on the HorizontalBox and VerticalBox if we rely only on unreal classes. But thanks for letting me know about what we can expect in the future, we will propably add new layout components with RTL/mirroring support for e.g. tables/GridLayout.
  2. Thanks for the code snippets, we will use this approach.

Best regards,

Benjamin

[Attachment Removed]