rtl (right to left) support

Hello,

I using RTL languages (Right To Left) in my app,but it’s not true view.

In the html and css we do it with direction.

direction and align is two different things in RTL languages.

align is the position of text in text box but direction is the format of “how to write”.

I made this simple html and CSS to show that different.

text-align and direction

thank you.

the first line have a RTL direction and show true view.but corona sdk is always show in LTR format like second line.

link

if somebody say to me how i fix it by any language i try to find solution.

because i started work with corona sdk less than week, I don’t have any idea.

I’m not sure what your question is?  I don’t see a difference looking at your HTML site.  What have you tried?  What are you doing to generate your text?  Can you post some code?  (Make sure to use the <> button in the bar with bold, italics, etc.

the problem is happened when RTL string and LTR string included in one sentence.

in corona defualt is LTR and happen like false section in the picture.

Are you taking about writing code or calling display.newText() to show text to the app user?

the problem in display,

local mystring="سلام این یک متن true است" rowText = display.newText(mystring,0,0,myfont, 14.4,"right")

the first section is = سلام این یک متن

the second section is= true

the third section is=است

In the screen shut you see the third section coming first.

there is no direction option like MSWord and in html and css (direction :rtl)

I apologize if I’m misunderstanding the issue, but there is an option to set the alignment with the display,newText() API:

https://docs.coronalabs.com/api/library/display/newText.html#align-optional

https://docs.coronalabs.com/api/library/display/newText.html#multi-line-text-with-alternate-alignment

thank you alex@panc but in my last post in code section i use it; not work

that’s not a complex bug.

display.newText isn’t true display RTL text.

the true display is like green area in the picture

[sharedmedia=core:attachments:4260]

First the “right” and “left” just position the text in a multi-line text block to the right side of the block. Your code is also not setting up a multi-line text block, but a single line text block in which alignment has no meaning.  This tutorial:

https://coronalabs.com/blog/2014/02/11/tutorial-methods-for-positioning-text/

should help you understand what’s going on.

Rob

thank you but Did not help to solve the problem.

the first line have a RTL direction and show true view.but corona sdk is always show in LTR format like second line.

link

if somebody say to me how i fix it by any language i try to find solution.

because i started work with corona sdk less than week, I don’t have any idea.

I’m not sure what your question is?  I don’t see a difference looking at your HTML site.  What have you tried?  What are you doing to generate your text?  Can you post some code?  (Make sure to use the <> button in the bar with bold, italics, etc.

the problem is happened when RTL string and LTR string included in one sentence.

in corona defualt is LTR and happen like false section in the picture.

Are you taking about writing code or calling display.newText() to show text to the app user?

the problem in display,

local mystring="سلام این یک متن true است" rowText = display.newText(mystring,0,0,myfont, 14.4,"right")

the first section is = سلام این یک متن

the second section is= true

the third section is=است

In the screen shut you see the third section coming first.

there is no direction option like MSWord and in html and css (direction :rtl)

I apologize if I’m misunderstanding the issue, but there is an option to set the alignment with the display,newText() API:

https://docs.coronalabs.com/api/library/display/newText.html#align-optional

https://docs.coronalabs.com/api/library/display/newText.html#multi-line-text-with-alternate-alignment

thank you alex@panc but in my last post in code section i use it; not work

that’s not a complex bug.

display.newText isn’t true display RTL text.

the true display is like green area in the picture

[sharedmedia=core:attachments:4260]

First the “right” and “left” just position the text in a multi-line text block to the right side of the block. Your code is also not setting up a multi-line text block, but a single line text block in which alignment has no meaning.  This tutorial:

https://coronalabs.com/blog/2014/02/11/tutorial-methods-for-positioning-text/

should help you understand what’s going on.

Rob