Search code examples
androidiosdelphifiremonkeyright-to-left

Bidi Right to Left Language in Firemonkey Mobile


How can show any string in right to left languages such as Persian or Arabic in Android or iOS with FireMonkey?

I Use Embarcadero Rad Studio XE6 (Delphi) and when I put a TLabel or TEdit and set its text to "سلام" (Hello in Persian) everything is OK in Windows and Mac but in Mobile platform that is wrong display, in Android shows "م ا ل س" and in iOS does not show anything but space.

The problem still exists in Delphi XE7.


Solution

  • Firemonkey does not natively support Right-To-Left text rendering. You will have to use a third-party library for this. One of the best options is Skia4Delphi: https://github.com/skia4delphi/skia4delphi

    In the library demo itself there is an example using Right-To-Left. Look:

    enter image description here