469,903 Members | 2,020 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

Changing the current thread culture Info not working


iam trying to set a culture info different than the current culture info on the system, the code compiles fine, but nothing happens, and the system culture is the one used for the program.

here is the code :


CultureInfo ci = new CultureInfo("ar-SA"); // arabic Saudi Arabia
ci.DateTimeFormat.Calendar = new HijriCalendar();

Thread.CurrentThread.CurrentCulture = ci;
Thread.CurrentThread.CurrentUICulture = ci;


why is it not working? am i missing something?

even if the culture info on the system is "ar-SA" and tried to change the current thread current culture to "en-US", also nothing happens, why????????

thank you
Sep 20 '08 #1
2 5833
7,872 Expert 4TB
How do you know it did not work? Did you check to see what the property said after?

Did you follow the example given here:

I don't think it just "magically" makes everything match that culture, I think you have to code things into a resource file or something. Then depending on the CurrentCulture, it will pull a different value from the resource file(s)
Sep 22 '08 #2
Iam sorry my question was not clear, i meant that when i change the culture info, the calendar is not changing, it is displayed as the regional settings culture.

i found out later that microsoft says that the DateTimePicker control does not depend on .NET classes, it is a windows API, so settings the CurrentUICulture to arabic will not make the calendar arabic.

thank you.
Sep 22 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Gani Pola | last post: by
2 posts views Thread by Alvaro E. Gonzalez V. | last post: by
3 posts views Thread by cmrchs | last post: by
5 posts views Thread by Jason L James | last post: by
3 posts views Thread by Gürkan Demirci | last post: by
2 posts views Thread by Christian Robert Schulz | last post: by
6 posts views Thread by =?Utf-8?B?Z3JlZw==?= | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.