Somehow I just get a Visual of the Logical Song (as sung by Supertramp)

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


Content of Michael Kaplan's personal blog not approved by Microsoft (see disclaimer)! 

The question seemed so simple (as it usually does):

Could you please explain me: why when I have the Arabic (Saudi Arabia) locale then the full date time format (“dddd, MMMM dd, yyyy HH:mm:ss”) actually looks as “dd tt hh:mm:ss MMMM, yyyy”. And opposite if conversation was done with the "dd tt hh:mm:ss MMMM, yyyy" pattern the result starts with substring "dd MMMM, yyyy"? Thanks for your attention.

Luckily sometimes the answer is simple, too! :-)

Let's take a look at this locale in Regional and Language Options, like right here:

and hit that Customize this format... button to get to the detail dialog about date formats.

Believe it or not, this is expected -- it is basically something you can look at two different ways, both of which are technically valid (though the second is probably "more" valid!):

The format strings themselves are using Latin script characters, which are always going to be normally used in a left-to-right context, while in the case of Arabic the actual string that has been formatted and which includes Arabic text will be displayed in a right-to-left context. So what appears on the surface to be a "reversed" string is actually just at RTL formatted string based on an LTR format string.

The format strings themselves are in logical order, which is always left-to-right and independent of how the final strings would be visibly displayed, while the formatted string in a language like Arabic will be displayed in a visual order that will be right-to-left.

So nothing is really in the wrong order, and things are mostly behaving as they are designed to.

I'll talk about when things get a little weird in a new blog some day.... :-)

 

This blog sponsored by غ (U+063a, aka ARABIC LETTER GHAIN)


lewis on 29 Mar 2008 10:19 AM:

what are those large fluid filled structural abnormalities in yer brain?


referenced by

2010/11/12 Suddenly, in a bit more time than a blink of an eye, "standards support" becomes "less i18n support"

2008/08/04 Tap your heels together three times and the problem is solved?

2008/06/25 So logical that even Mr. Spock (and my fiancée?) would approve

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