date localization using the ajax calendarextender

C

Carlos

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.
 
G

Guest

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/01/09/change-culture-calendarextender/

Hope this helps
 
C

Carlos

That did it. Thanks Alexey.

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/01/09/change-culture-calendarextender/

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top