get client user culture info

G

Guest

Hi;

How do I get the client user culture? I need to get the names for the
weeks/months, num days/week, months/year, days/month, etc to display date
selections to the user correctly.
 
W

Walter Wang [MSFT]

Hi David,

ASP.NET 2.0 has a new feature called 'Auto-Culture Handling': it maps
Accept-Language headers to CultureInfo objects and attaches them to the
current thread. Auto-Culture handling can be enabled for individual pages
by including 'Culture="auto" UICulture="auto"' attributes in the @ Page
directive. It can be enabled site-wide by including a <globalization
culture="auto" uiCulture="auto"/> element in web.config.

Then you can access the DateTimeFormatInfo.Current instance to get the
various info you needed.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top