You'll flip if you see the early right-to-left builds of products (aka Don't flip if you have to flip or not flip)

by Michael S. Kaplan, published on 2007/10/01 03:16 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/10/01/5217431.aspx


Regular reader Serge Wautier asked over in the microsoft.public.win32.programmer.international newsgroup:

By default, progress bar fill from left to right in LTR locales and right-to-left in RTL locales.

When I added support for RTL languages to appTranslator, I decided that it was not a good idea and I added code to defeat this behaviour in dialogs that contain progress bars:

Rather than simply addin WS_EX_LAYOUTRTL to the dialog layout, I also added WS_EX_NOINHERITLAYOUT and I added WS_EX_LAYOUTRTL to all controls but progress bars.

For reasons beyond my understanding, I never ever considered that a progress bar filling from right to left was the desired behaviour!

Time flew. I am now investigating a related problem and I realize I was most likely stupid and I should fix this stupid design decision. Before I do it, I'd like to make sure I was dumb hence my question to you RTL knowledgeable people out there:

What should be the filling direction of a progress bar in RTL locales: RTL or LTR?

Sorry for the apparently stupid question but I'm confused ;-)

(In this case, they should in fact be mirrored, for what it is worth....)

But this is not a stupid question, really. Well, at least if it is I wish people would be willing to risk acting stupid a bit more often, since I have seen my share of improperly mirrored dialogs and applications in my time.

In fact there were some pre-release versions of Vista that were incorrectly mirroring the datetime dialog and the clock gadget -- and believe me you will never feel as not-stupid about mirroring as when you saw a copy of Vista doing this:

or this:

Thankfully these bugs were fixed prior to ship. :-) 

The fact is that for each user interface component (be it a progress bar, clock, calendar, dialog, menu, or whatever) there is an expected behavior. And the initial builds of RTL user interface languages are almost guaranteed to have mistakes in them with things that are either not flipped when they should be or over-actively flipped like in these examples.

There is no one rule to follow, though the best bet when dealing with localized user interfaces is that rather than trying to solve the problems completely in code in some automated way, you make sure that the setting is exposed to localizers in some way, since they are the people who are being paid to bring their expertise to the situation and decide what to flip and what not to flip....

Then the second rule is to have people who know what the conventions are reviewing the user interface, so they can tell you when things are right and when they are wrong. Then if you know who did (or did not do) the flipping you'll know if it is your bug, a localization bug, or both.

And the third rule -- don't flip if you have to flip or not flip. If you know what I mean. :-)

 

This post brought to you by (U+260f, a.k.a. WHITE TELEPHONE)


# John Cowan on 1 Oct 2007 8:40 AM:

I find the flipped map rather charming, actually.

In an office not too far from mine there is a physical analog clock with normal works (it spins clockwise and all that) but with randomly assorted numbers.  I try to avoid looking at it....

# Maurits [MSFT] on 1 Oct 2007 8:23 PM:

The flipped map reminds me of the "Hollow Earth" theory -- see Jules Verne's "A Journey to the Center of the Earth"

# Arun Philip on 2 Oct 2007 2:49 AM:

@Maurits,

So, Axel and the professor ought to use the flipped map for their timezones, when looking up at their sky? :)

Although, they'd call our continents their constellations :))

PS: Thanks for taking me back 10 years to school, when that was one of our texts.

# Michael S. Kaplan on 2 Oct 2007 2:54 AM:

Wow, and thanks for taking me back to when "taking me back to school" was just ten years ago! I had a birthday recently and that kind of memory is nice to have....


go to newer or older post, or back to index or month or day