By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,122 Members | 1,596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,122 IT Pros & Developers. It's quick & easy.

Changing the current thread culture Info not working

P: 4

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
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 7,872
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

P: 4
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.