65 views
in GUI Development by
Hello,

I just included Hebrew language and I am investigating the better way to support it.

I understood of the property "Enable Bidi Text" should do it, but it doesn't seem to work for me.

My Alignment is Views::TextAlignment[AlignHorzLeft, AlignVertCenter] but I would like for RTL languages to AlignHorizRight instead.

Is there an easier way or do I have to generate a variant for all those cases with condition of one of the RTL languages?

1 Answer

+1 vote
by
 
Best answer

Hello,

Based on the documentation and your question, you don't need to create variants for RTL languages. The solution is to use the AlignHorzAuto option instead of AlignHorzLeft.

How AlignHorzAuto works:

  • It automatically determines the correct horizontal alignment based on the text content's base direction
  • For RTL scripts like Hebrew and Arabic, it will automatically align the text to the right
  • For LTR text, it will automatically align to the left
  • The alignment is determined by the first strong directional character (LTR or RTL) found in the text

Additional considerations:

  1. Make sure EnableBidiText is set to true (which you've already done)
  2. The AlignHorzAuto option works in conjunction with bidirectional text support
  3. This approach eliminates the need to manually check for RTL languages and switch between AlignHorzLeft and AlignHorzRight

This is the recommended approach mentioned in the documentation specifically for bidirectional text scenarios, and it will handle Hebrew text automatically without requiring language-specific variants or conditional logic.

I hope this helps.

Best regards,

Manfred.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...