Right to Left Support

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:

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.

any response or update on this issue ?

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

pbakker:
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:
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.

Will be investigated.

Paul

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?

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 …

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.

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?

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.

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 :).

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?

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.

No problems,

I will open a case once this has been implemented.

Thanks for your effort

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.

Are there any promising or expectations for the 99940 and 99941 incidents ?

Would you please consider this in the V4.0?

99941 is on the long-term list and will not be included in 4.0.0.
99940 will be present in the final release of 4.0.0

I want to be sure I understand correctly what the expectations are for applying LTR for the remaining items. You said RTL is not yet applied to:

  1. Form: what would you expect from a LTR form? The components inside it use absolute positioning. Do you expect them to be positioned as if the (0, 0) coordinate is in the right-upper corner of the form instead of upper-left?
  2. Navigator: the navigator should appear on the right hand side of the form in LTR.
  3. Toolbars (I think this one is clear)

Andrei Costescu:

  1. Form: what would you expect from a LTR form? The components inside it use absolute positioning. Do you expect them to be positioned as if the (0, 0) coordinate is in the right-upper corner of the form instead of upper-left?

Yes, plus

  • Form’s Vertical Scroll Bars should be moved to left
  • Components should inherit the default form orientation if the component orientation was set to default
  • components’ vertical scrollbars should be moved to left
  • Flip images (if possible)

Andrei Costescu:
2. Navigator: the navigator should appear on the right hand side of the form in LTR.

Yes and the spinner, arrow should be pointing to left.

Andrei Costescu:
3. Tool bars (I think this one is clear)

Good

However, we really appreciate your care about the Arabic Speaking customers, and we hope we and you can reach the best in the region.