PC Review


Reply
Thread Tools Rate Thread

date localization using the ajax calendarextender

 
 
Carlos
Guest
Posts: n/a
 
      14th Oct 2009
Hi all,

I would like to create a web app available in English, and Spanish.
I started out by trying to get the correct format of the date in case that the language
settings in the browser are set to Spanish, and for that I am capturing it
inside the InitializeCulture(), i.e.:

protected override void InitializeCulture()

{

languages = Request.UserLanguages;

if (languages != null)

{

Thread.CurrentThread.CurrentCulture =

CultureInfo.CreateSpecificCulture(languages[0]);

Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(languages[0]);


}

base.InitializeCulture();

}

However, when I use the AJAX calendar extender control, it renders the calendar in

English, and places the picked date into the designated textbox in US-EN default

format. Is there any way to make it render, and display in the captured culture?

Thanks!



Carlos.




 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      14th Oct 2009
On Oct 14, 8:09*pm, "Carlos" <caher...@yahoo.com> wrote:
> Hi all,
>
> *I would like to create a *web app available in English, and Spanish.
> I started out by trying to get the correct format of the date in case that the language
> settings in the browser are set to Spanish, and for that I am capturing it
> inside the InitializeCulture(), i.e.:
>
> protected override void InitializeCulture()
>
> {
>
> languages = Request.UserLanguages;
>
> if (languages != null)
>
> {
>
> Thread.CurrentThread.CurrentCulture =
>
> CultureInfo.CreateSpecificCulture(languages[0]);
>
> Thread.CurrentThread.CurrentUICulture = CultureInfo.CreateSpecificCulture(languages[0]);
>
> }
>
> base.InitializeCulture();
>
> }
>
> However, when I use the AJAX calendar extender control, it renders the calendar in
>
> English, and places the picked date into the designated textbox in US-EN default
>
> format. Is there any way to make it render, and display in the captured culture?
>
> Thanks!
>
> * *Carlos.


Try to set the ScriptManager.EnableScriptGlobalization to True. Plus
take a look at the following article, where you can see more
information on this

http://lancezhang.wordpress.com/2009...endarextender/

Hope this helps
 
Reply With Quote
 
Carlos
Guest
Posts: n/a
 
      15th Oct 2009
That did it. Thanks Alexey.

"Alexey Smirnov" <(E-Mail Removed)> wrote in message
news:0834cc62-45f1-45cf-b93b-(E-Mail Removed)...
On Oct 14, 8:09 pm, "Carlos" <caher...@yahoo.com> wrote:
> Hi all,
>
> I would like to create a web app available in English, and Spanish.
> I started out by trying to get the correct format of the date in case that
> the language
> settings in the browser are set to Spanish, and for that I am capturing it
> inside the InitializeCulture(), i.e.:
>
> protected override void InitializeCulture()
>
> {
>
> languages = Request.UserLanguages;
>
> if (languages != null)
>
> {
>
> Thread.CurrentThread.CurrentCulture =
>
> CultureInfo.CreateSpecificCulture(languages[0]);
>
> Thread.CurrentThread.CurrentUICulture =
> CultureInfo.CreateSpecificCulture(languages[0]);
>
> }
>
> base.InitializeCulture();
>
> }
>
> However, when I use the AJAX calendar extender control, it renders the
> calendar in
>
> English, and places the picked date into the designated textbox in US-EN
> default
>
> format. Is there any way to make it render, and display in the captured
> culture?
>
> Thanks!
>
> Carlos.


Try to set the ScriptManager.EnableScriptGlobalization to True. Plus
take a look at the following article, where you can see more
information on this

http://lancezhang.wordpress.com/2009...endarextender/

Hope this helps


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inline AJAX CalendarExtender corrupts subsequent layout Greg Peters Microsoft ASP .NET 0 29th Apr 2008 06:18 PM
CalendarExtender default date? HockeyFan Microsoft ASP .NET 0 13th Jun 2007 05:53 PM
Localization/Date Issues Vinod Microsoft ASP .NET 2 23rd Apr 2007 10:37 AM
Date Localization Sylvain Microsoft Access 0 4th Feb 2005 02:18 PM
Date localization chak Microsoft ASP .NET 2 12th Dec 2004 01:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:21 PM.