Jump to content
Xtreme .Net Talk

Recommended Posts

  • Administrators
Posted

You could always use Request.UserLanguages to see what languages the client supports. It should return an array of strings with position 0 being the default. Something like the following should work...

Dim Language As String = Request.UserLanguages(0)

If Not ((Language Is Nothing) OrElse (Language.IndexOf("-") < 0)) Then
   Dim ci As System.Globalization.CultureInfo = New System.Globalization.CultureInfo(Language)
   Dim CurrencySymbol As String = ci.NumberFormat.CurrencySymbol
   Label1.Text = CurrencySymbol
End If

you may want to loop through all provided languages to detect multiple currency characters - or at least loop till you find a valid one.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

  • Administrators
Posted

In that case the easiest way is probably to either ask / offer a configuration section and store their selection somewhere. If the browser isn't configured correctly then you have no way of knowing their settings.

This might just be possible if you used an ActiveX control on your web page - however this wouldn't work for any non-IE browser, non-windows platforms or if the user has quite sensibly decided to dis-allow ActiveX for security reasons.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...