I can get client machine's language setting by Request.UserLanguages
But how can I get number and currency format information of client machine? that is , the information set by: control panel-->reginal and language options-->standards and formats. For example, I can set this format to Spanish(Argentina).
' This may help:
' 1st we get the current client (preferred) language;
Dim Lang as String
Lang = Request.UserLanguages(0)
' Then we create the CultureInfo from it
Dim CurrentCulture As New CultureInfo(Lang)
' Now we use it's properties...
Respnse.Write(CurrentCulture.NumberFormat.CurrencySymbol & "<br>")
Respnse.Write(CurrentCulture.NumberFormat.PercentSymbol) ' ...
' Omid!
May I ask why? The reasons I ask is that a common mistake is to try and format up results by hand rather than correctly setting the formatters culture.
None
0 Points
4 Posts
How can I get client machine's currency format information?
Aug 22, 2005 10:32 PM|macroysy|LINK
But how can I get number and currency format information of client machine? that is , the information set by: control panel-->reginal and language options-->standards and formats. For example, I can set this format to Spanish(Argentina).
Member
2 Points
26 Posts
Re: How can I get client machine's currency format information?
Aug 23, 2005 08:13 AM|bhumika.dave|LINK
following might help u.
CultureInfo cl=new CultureInfo(Thread.CurrentThread.CurrentCulture.Name) //gives culture on machine
cl.NumberFormat.CurrencyDecimalDigits
cl.NumberFormat.CurrenySymbol etc..
Regards.
None
0 Points
4 Posts
Re: How can I get client machine's currency format information?
Aug 24, 2005 03:13 AM|macroysy|LINK
for our application is cient-server architecture. Client access server by web page.
All logics run in IIS server.
So we can't get client machine's information by Thread.CurrentThread.CurrentCulture
None
0 Points
58 Posts
Re: How can I get client machine's currency format information?
Aug 27, 2005 06:10 PM|O.Q.Rose|LINK
' 1st we get the current client (preferred) language;
Dim Lang as String
Lang = Request.UserLanguages(0)
' Then we create the CultureInfo from it
Dim CurrentCulture As New CultureInfo(Lang)
' Now we use it's properties...
Respnse.Write(CurrentCulture.NumberFormat.CurrencySymbol & "<br>")
Respnse.Write(CurrentCulture.NumberFormat.PercentSymbol) ' ...
' Omid!
MCP, MCAD
Member
81 Points
1847 Posts
Re: How can I get client machine's currency format information?
Sep 10, 2005 01:17 PM|pkr|LINK