Page 1 of 2

Right to Left Support

PostPosted: Wed Jul 25, 2007 9:58 am
by MSibai
Hi,
in the HTML tags there is a property called dir which should be "ltr" or "rtl".
this is so important when using languages like "Arabic" or "Hebrew".

Note: Right-To-Left is completely different that align to right . this is a (bi-di) option that is available in java.

You know most of the Arab countries are using Arabic language in all application, so for my customers here this is considered as an "Issue", thats why I am gonna classify it as issue not a feature request.

How ever, it is still a low priority issue for me here, but I don't want any complaints from any customer here, plus this means that Arabic language is NOT 100% supported, so this will lead some clients to refuse Servoy (Unfortunately).

I think this could help fixing this, and i hope it will be included in Servoy 4.
When using JTextField Bean, I could write the following:
Code: Select all
elements.bean_536.componentOrientation = Packages.java.awt.ComponentOrientation.RIGHT_TO_LEFT;

Which worked like charm, but I am not going to use beans.
I played in the CSS to make it 'rtl' but it never worked with me ...

however, this will be great if you add it to the field properties list, and the value is being read fro i18n messages table.

Ticket #66044 was opened with the support, but I got no response from a long long time, thats why I have decided to list it here.

PostPosted: Mon Jul 30, 2007 12:17 am
by MSibai
any response or update on this issue ?

PostPosted: Mon Jul 30, 2007 9:06 am
by pbakker
Hi Mohamad,

Could you clarify what exactly is the issue? I understand from your post that you have an issue with right-to-left support, but in which scenario?

What are the language settings of the client when this happens, which OS en Java version and on which type of (Servoy0 elements aren't you getting the behavior you'd expect?

Regards,

Paul

PostPosted: Mon Jul 30, 2007 12:39 pm
by MSibai
pbakker wrote:Could you clarify what exactly is the issue? I understand from your post that you have an issue with right-to-left support, but in which scenario?

When typing inside any field in Servoy... Servoy Supports only LTR..
See the attached image; this is an arabic word followed by opening bracket (Shift + 0)

RTL Languages like (Arabic, Farisi, and Hebrew)...
pbakker wrote:What are the language settings of the client when this happens, which OS en Java version and on which type of (Servoy0 elements aren't you getting the behavior you'd expect?

Any locale, Windows XP, any java version (up to 1.6_2), any Servoy Version (up to 3.5), and any field you can type text in it.

PostPosted: Mon Jul 30, 2007 2:00 pm
by pbakker
Will be investigated.

Paul

What currently works / does not work

PostPosted: Wed Aug 15, 2007 11:04 am
by Andrei Costescu
Hi,

I tried to use Hebrew to reproduce the situation in the picture you attached, but it seemed to work (partially) for me.

Changed the keyboard to Hebrew in Servoy Smart Client and typed something like "abcdef1234" on my keyboard. The result was the same as in notepad - the text was written RTL. (see attached picture) In web client, the text was shown ok too afterwards.

I said partially, because I had to use right alignment in order to place the text in the right side of the text field. Also, when using a text-area, right alignment does not work, so the text is still RTL, but not right aligned.

So it works partially, but the orientation still needs to be added in order for textarea (and other components probably) right-alignment to work.

How did you exactly input the text into Servoy so that the text field shows it wrong? By typing it inside Servoy just as I did or did you insert the text into the table some other way?

PostPosted: Wed Aug 15, 2007 5:11 pm
by MSibai
Hi Andrei,

Unfortunately, I cannot read Hebrew, but ....

Try to prefix your text with numbers and put spaces i.e. "1234 abcdef" instead of "abcdef1234" ... I am sure you will see the issue even in the note pad ...

Right

PostPosted: Thu Aug 16, 2007 9:32 am
by Andrei Costescu
You are right.
If I type the numbers first, Servoy shows 1234 شلاؤي while notepad puts the number to the right of the text...
Funny, the same thing happens now on the forum as in Servoy. (probably because the RTL alignment is missing is not used on the forum also)

So a text orientation property it the best way to go I think.

Proposal

PostPosted: Wed Aug 22, 2007 9:54 am
by Andrei Costescu
Would a servoy solution setting (combobox) with values "default, leftToRight, rightToLeft, locale based" help?
The orientation of all components in the solution (that support orientation) would be set according to the value of the solution orientation setting.

Would this solve the issue?

PostPosted: Wed Aug 29, 2007 8:39 am
by MSibai
Hi Andrei,

Sorry for late to reply, I was in vacation.

Your suggestion is great as all components will inherit this property, but still it is required to explicitly set this property to certain fields..

For example, CRM application could contain both customer Arabic name and customer English name.

In this case you have to explicitly to set the Arabic name field's orientation to RTL and English name field's orientation to LTR, regardless of what is the solution default orientation.

Added text orientation property to solution

PostPosted: Wed Sep 26, 2007 3:26 pm
by Andrei Costescu
Introduced "Text orientation" solution property - in Servoy 3.5.2 and Servoy 4.0.

You can choose:
- default orientation
- left to right orientation
- right to left orientation
- locale specific orientation

Locale specific orientation decides the type of orientation to apply based on the current locale.
The solution needs to be re-opened in order for text-orientation changes to become effective.

Text orientation is applied to the entire solution and will affect text containing widgets as well as the orientation of cells in a table view.

If you need a more precise control of the orientation (like at component level) you should add another case as a feature request in the Servoy Support System.

Enjoy :).

PostPosted: Thu Sep 27, 2007 2:07 am
by MSibai
Hi Andrei,

This is really amazing, you really don't know how much this feature is important to customers here in the region.

Only one question, referring to my latest reply to you, do I still have the ability to explicitly set the orientation of some object LTR while solution is RTL, or vice versa?

No

PostPosted: Thu Sep 27, 2007 9:14 am
by Andrei Costescu
Hi MSibai,

No, currently you do not have this ability. That is what I meant with
If you need a more precise control of the orientation (like at component level) you should add another case as a feature request in the Servoy Support System.

So if you need the ability to exlicitly set the orientation to one object, there is more to be implemented.

PostPosted: Thu Sep 27, 2007 5:30 pm
by MSibai
No problems,

I will open a case once this has been implemented.

Thanks for your effort

PostPosted: Mon Oct 29, 2007 6:30 pm
by MSibai
This has been implemented in Servoy 3.5.2. Thank you guys ...

However, two new tickets have been created in Support System:

99940: Right to Left is Not applied to the Form, Navigator and toolbars (feature request)
99941: Orientation Per field/Object Properties (issue)

Hope Servoy to implement this soon.