RTL (Persian / Arabic) Text Support for Defold šŸŽ®

I don’t see a difference from your google text and our ingame text. At least not any reordered words? Can you specify more specifically?

I think if you would put it in a google sheet, and use the same font, it’s easier for you to spot any differences.

1 Like

I haven’t had a chance to check the text system in the new version yet.
But one of the challenges of displaying RTL text is that, when the text is multi-line, the line order is reversed.
But in your screenshots, I don’t see any problem.

1 Like

Thanks both, yes that’s what I was referring to, I wasn’t sure if the line order was correct in the multiline version. Thanks for the clarification, it looks like everything’s all working my side now.

@thawri Can I ask for your expertise in this example, if this is correct? And is it better/more convenient to display RTL with Pivot on the other side?


I can just guess the lines are not reversed, because ā€œRTLā€ and ā€œLTRā€ are in the bottom line - so it should be actually, that those are in the line above (reversed, from bottom to the top)?

yes, it is correct.
and it is better to set East as pivot for RTL texts.

1 Like

Hopefully soon, we can change the pivot at runtime, in order to more easily switch languages as well :slight_smile:

3 Likes

The localization example is now on the Defold examples :

Btw, this is a first time we made an example with Lua modules being used. This was meant to simplify understanding the code and modularize it. I’d be very fond of any feedback! :wink:

6 Likes