Problems with localization -
03-03-2005
, 11:47 AM
I have to display content (specially currencies) in the Users local format.
Currently Iam doing below in my code (VB.NET)
----------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim sLang As String
sLang = Request.UserLanguages(0)
Thread.CurrentThread.CurrentCulture = New CultureInfo(sLang)
End Sub
-----------------------------------------------------------------------------------------
My PC had US regional settings ... but I changed it to United Kingdom for
testing purpose by going to Settings>>control panel>>Regional settings . I
even rebooted my PC just to make sure .
If I do String.Format("{0:c}", 0) somehwhere in my code it displays as
$0.00 instead of £0.00 on the page
CUrrently my PC is running Windows 2000 professional. I am running the
application as localhost
Any Ideas of what I may be doing wrong......?