Blogs

News

Favorite Posts

ctodx

Discussions, news and rants from the CTO of Developer Express, Julian M Bucknall

Right-to-left language (RTL) support in our WPF controls

     

Something we haven’t made much hoopla about is the fact that our WPF controls, such as the DXGrid for WPF) support RTL languages out of the box. One of the reasons is simple: we’re all LTR people at DevExpress, of different languages and countries, sure, but we all read from the left to the right.

So Emil Mesropian, tech evangelist for our XPF products, ran a test (he knows Farsi, but heck no one knew...) on the DXGrid using Farsi.

DXGrid - RTL

The immediate thought is: aren’t the numbers supposed to be right-justified? Or does the justification of numbers flip to the other side of the column (like we have it here) when using an RTL language? We didn’t know so Emil did some more research:

TSE - RTL Table

This is a screenshot from the Tehran Stock Exchange. The problem here is that they use Eastern Arabic numerals and center-align them. Hmm.

Next bit of research:

TASE - RTL Table

 

This is from the Tel-Aviv Stock Exchange and shows Western Arabic digits like we’re used to in the West and right aligns them like we’re used to. So no numeric column flipping.

The mire gets deeper, though:

Israel RTL Percent

This shows that Hebrew shows that numbers with symbols are shown in the way we in the West expect. 

But:

KFH - RTL Percent

On this Kuwaiti site, percentages are shown with the symbol before the number. Emil was unable to find anything during this bit of research that showed dollar amounts (like $123.45) or Euro values (like €123,45), and so on, so we’re not sure how those would be represented.

The problem now is: what should we do? Whose conventions should we follow? The Hebrew/Israeli one? Or should we pay just as much attention to Arabic languages?

And more importantly who can help us clarify how to do this properly?

[Aside 1: This is explicitly about our WPF controls. I am not going to answer any questions about RTL on other platforms.]

[Aside 2: Please remember we cannot export to several Arabic countries under our export license. One of those is Iran, so even though I’m showing a screenshot from a Tehran government entity’s website, it’s only for illustration purposes.]

Published Oct 07 2010, 02:44 PM by Julian Bucknall (DevExpress)
Filed under: , , ,
Technorati tags: DXGrid for WPF, WPF, RTL, DXGrid
Bookmark and Share

Comments

 

Raoulw said:

Hi Julian,

For most people at DX never used :-) but this is actually a setting in Windows.

Control Panel -> Settings -> Lanuage of User Interface -> Notations -> More Settings ->

Then on the tabsheet "Numbers" the two options

"Default Numbers" and "Use Language Specific Numbers."

Maybe some researching can find out if the locale contains any info on the LTR part of the numbers.

So just follow the win settings..

Raoul.

October 7, 2010 6:23 PM
 

Alex Boston said:

Yes I agree with using windows/.Net Culture settings.

But if you want to generalize here is my input :

1 - regarding numbers : use Western Arabic digits 1234... and so on as already all RTL countries accepted this numbers and shifted to them ref  : http://www.ahram.org.eg/, http://www.alriyadh.com/, http://www.albayan.ae/.

2- Regarding symbols like % : 0.33% is ok and ref www.kuwaitse.com/.../A , http://www.tadawul.com.sa.

PS: I can post images also if you like but this isn't possible in comments.

October 8, 2010 9:43 AM
 

Hadi Eskandari said:

I'd side with @Raoulw It is always best to stick with window's globalization setting when possible. As for percentage mark placement goes in Iran, both will work.

October 10, 2010 7:02 AM

About Julian Bucknall (DevExpress)

Julian is the Chief Technology Officer at Developer Express. You can reach him directly at julianb@devexpress.com. You can also follow him on Twitter with the ID JMBucknall.
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.