Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / July 2005

Tip: Looking for answers? Try searching our database.

DateTime & ToShortDateString

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nugnet - 28 Jun 2005 17:52 GMT
Hi,
I have an ASP.NET web application that I want to be locale sensitive. I
set my regional options to be English (United States) and rebooted my
machine (normally have English(United Kingdom setting)).
I then ran the web app and on a page where I wanted to display a
default date of the current date, I had a call to the .NET framework
method DateTime.ToShortDateString().
The date that was displayed on the page still used the English (United
Kingdom) date format (i.e. dd/mm/yyyy).
Is there some other setting required in ASP.NET to display the current
locales date format. I wrote a small app to display the CurrentLocale
and CurrentUILocale and they both were English (United States).

Thank you in advance for any help
John
Michael (michka) Kaplan [MS] - 28 Jun 2005 19:01 GMT
ASP.NET is running in the context of the ASP.NET user on the server, not of
your user account's settings -- so the setting you did would not be expected
to control.

You can set the CurrentCulture to get the change you would like to show up,
perhaps off of the http accept language?

Signature

MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

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

> Hi,
> I have an ASP.NET web application that I want to be locale sensitive. I
[quoted text clipped - 11 lines]
> Thank you in advance for any help
> John
Mihai N. - 29 Jun 2005 08:09 GMT
> I have an ASP.NET web application that I want to be locale sensitive.
Usualy a web application should be sensitive to the language of the browser
doing the request, not the one of the hosting server.
You might be trying to solve  the wrong problem.

Signature

Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email

Klarissa - 15 Jul 2005 08:29 GMT
Hi
I have the exact same problem and would appreciate it if you would let me
know if you managed to solve the problem. I would think that the formats for
the ASP page should be determined by the requesting browser language settings
but it is clearly not.
Thanks

> Hi,
> I have an ASP.NET web application that I want to be locale sensitive. I
[quoted text clipped - 11 lines]
> Thank you in advance for any help
> John
Mihai N. - 16 Jul 2005 06:18 GMT
> I have the exact same problem and would appreciate it if you would let me
> know if you managed to solve the problem.
> I would think that the formats for the ASP page should be determined by
> the requesting browser language settings but it is clearly not.
It is. If for your application it is not, it is a problem on the application
side.
The original request was for the ASP application running on the server to
answer with the settings matching the client OS (not the client browser).
The browser and the OS locales are independent (you have to set them
separately). This is inlike Mac OS X, where the system also affects the
browser (somethimes a good thing, sometimes not).

Signature

Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email

Michael (michka) Kaplan [MS] - 19 Jul 2005 15:50 GMT
Actually, by default Windows sets the browser's lang to the user locale (but
this can be overridden).

Signature

MichKa [Microsoft]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Blog: http://blogs.msdn.com/michkap

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

>> I have the exact same problem and would appreciate it if you would let me
>> know if you managed to solve the problem.
[quoted text clipped - 8 lines]
> separately). This is inlike Mac OS X, where the system also affects the
> browser (somethimes a good thing, sometimes not).

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.