Language Arabic Support

Hi there, is there any idea for this problem?

The problem is showing in the picture. Left side is a arabic sentence showing in the Excel and the right side is showing in the Corona SDK. The problem is the last punctuation is always converted to right side of the sentence. It supposed to be left side of the sentence. And the other thing is if i put some arabic letters after the last punctuation, it is all good.

What should i do with last punctuation?

Cheers

There are no images attached…

Corona just displays a string that you construct, so you should be able to put the punctuation wherever you need it before you call display.newText().

Rob

Hi Rob, Thanks for your reply, I don’t know why i cannot attach my jpg file. Anyway, i found that if i add a period in the end of arabic sentence string. The period supposed to be the left of the sentence because the writting direction of arabic is from right to the left. But the period was showing in the right of the sentence when rendering to the corona. Dominic

I think the problem is the writting direction of arabic is opposite with our language. When we writting the arabic string in the sublime, we will write it from left to right, but we need to reverse arabic string before we render to the corona sdk. The render engine may make some change in this part.

The render engine just takes the string and generates a display object. We in no way analyze the string and move characters around and since we use the operating system’s text rendering, they might, but I don’t see why they would.

If you render:  “.sentence a is this” that’s what you should get back.

Rob

Arabic language has no problems with corona

i have done dozens of Arabic Apps with it

sublime reverses the text but on corona it shows properly … you just need sometimes to align your text control left, right or center

Hi Kakula,

We’re having similar problems with Arabic text display.

  1. For the title part, it appears to be correct, though some letters appear to be slightly disconnected. We’re using bitmap fonts.

  2. But the message part appears to be wrong. the display should be top to bottom, but now it’s reversed.

Screenshot here. Any advice?

Ben

There are no images attached…

Corona just displays a string that you construct, so you should be able to put the punctuation wherever you need it before you call display.newText().

Rob

Hi Rob, Thanks for your reply, I don’t know why i cannot attach my jpg file. Anyway, i found that if i add a period in the end of arabic sentence string. The period supposed to be the left of the sentence because the writting direction of arabic is from right to the left. But the period was showing in the right of the sentence when rendering to the corona. Dominic

I think the problem is the writting direction of arabic is opposite with our language. When we writting the arabic string in the sublime, we will write it from left to right, but we need to reverse arabic string before we render to the corona sdk. The render engine may make some change in this part.

The render engine just takes the string and generates a display object. We in no way analyze the string and move characters around and since we use the operating system’s text rendering, they might, but I don’t see why they would.

If you render:  “.sentence a is this” that’s what you should get back.

Rob

Hi,

You don’t need to be confused when you see the arabic text in corona sumulater. The Corona render might be wrong, but when you pack your app and install in your phone, you will find everything is rendering in right way.

Hope that it’s help.

Cheers

 

 

Hi 442342472,

Thanks for replying. Been spending some time sorting out Arabic display, here is what i have discovered so far:

  1. Most text editors don’t natively support RTL languages, the visual display is wrong, but it’s logical display is correct.

  2. I was using Sublime Text with a bidi plugin. It fixes the visual display but it also screws up with the logical display, resulting in text to speech failing to read them. You can verify this easily by pasting any fixed Arabic sentence to Google Translate, you’ll get nonsense.

  3. Was using fontmanager.lua to display bitmap fonts in Arabic. display.newBitmapText ( ) does not seem to be able to render Arabic correctly. You can use bidi algorithm to fix the display, but that will screw up your text to speech.

  4. Even though the visual display in wrong in text editors, Corona renders them properly in the latest versions I’ve been using. Corona’s display.newText ( ) renders Arabic correctly and supports multi-line displays and right alignment with systemfont, even in the simulator.

Ben

Arabic language has no problems with corona

i have done dozens of Arabic Apps with it

sublime reverses the text but on corona it shows properly … you just need sometimes to align your text control left, right or center

Hi Ben,

Thanks for replying. The version of our Corona is 3184. We found that the arabic rendering was wrong in simulator but was right in phone.

We will download the latest release of corona and try again. I think you don’t need to mind the visual display in text editor, as long as the redering was right on the phone.

Dominic

 

 

Hi Dominic,

We’ll keep that in mind. Please share any invaluable advice implementing RTL languages.

Thanks.

Ben.

Hi Ben,

We just find a new thing. When you pack your game and test on the phone, remember testing it on both IPhone and android, because we found the rendering are different and we need to fixed some problem for IOS.

Dominic
 

 

What kind of issues?

Ben

Hi Ben,

We need to set align in function display.newtext for ios but no need to set that for android. And the visual display of textField also have same problem.

Dominic

 

 

+1