[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 501
  • Last Modified:

Calendar control in custom language (en,fr,de,sp,...)

Hi Experts,

I want to use the calendar control, but it seems to be displayed with the browser language.
But I need to use my own website language. So is it possible to set ?
I mean if my website doesn't support french, the default language is english. But the calendar is displayed in french (not professional I think).

I also want to know if it's possible to translate a month like november in french,spanish (for example) with the framework as the calendar control does.

Thanks in advance to tell me more about this particular problem.
0
noulouk
Asked:
noulouk
  • 2
  • 2
2 Solutions
 
mmarinovCommented:
Hi noulouk,

have you tried to set the System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");

Regards!
B..M
mmarinov
0
 
nouloukAuthor Commented:
Yes, thanks you were right. It depends on my cultureinfo.

Could you give me about my other question ?
I also want to know if it's possible to translate a month like november in french,spanish (for example) with the framework as the calendar control does.
0
 
mmarinovCommented:
noulouk,

System.Globalization.CultureInfo ci = new System.Globalization.CultureInfo("fr-FR");
System.Threading.Thread.CurrentThread.CurrentCulture = ci;

System.Globalization.DateTimeFormatInfo fi = ci.DateTimeFormat;
Response.Write(fi.GetMonthName(11));

Regards!
B..M
mmarinov
0
 
nouloukAuthor Commented:
Thank you very much.

Follow this link and I'll grade you more:
http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21212997.html
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now