Question

Some of my Arabic users are reporting problems back to me with my application giving errors.

Common for them seem to be they are using Hijri calendar and TDateTimePicker control causing problems (but quite possibly it is the entire TDateTime and RTL that has problems, I am not sure)

The Hijri Calendar has a different year start/end which is not well suited for my application. (AFAIK, Hijri first became available in Windows7.)

I have problem reproducing the error because 1) I can't read Arabic making it much harder 2) I can only pick Hijri when Windows is set to Arabic (otherwise it is not a visible option)

Anyone here with the same problems? I Use Delphi 2010

Can I force my application into using standard calendar? (as solution) or can I force Windows to Hijri calendar on English Windows? (for testing)

Was it helpful?

Solution

In XP anyways, if you already have not done so, on Control Panel's Regional and Languages options dialog, go to the Languages page and first check the Supplemental Language Support checkboxes (Install files for complex script and right-to-left languages (including Thai)". For fun, check the East Asian languages one too, for later when you're going to want to check that chinese characters work properly.

Then, from the Control Panel, "Regional and Language Options" go to the "Advanced" tab and change the "Language for non Unicode programs" to an Arabic language.

enter image description here

Next you can go to date/calendar options and change to calendar type:enter image description here

Hirji Calendar in arabic looks like this: التقويم الهجري

Original source MSDN: http://www.microsoft.com/middleeast/msdn/ArabicCalendar.aspx

Additional pro tip: If you aren't already doing so, start using VMs for internationalization testing. Do you really want to do all this to your main workstation? Not me. I do this stuff in VMs.

OTHER TIPS

You can use the Windows API function SetLocaleInfo, this would change the user's settings in the windows control panel which may be undesirable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top