• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet&JSP: Decimal pointer problem

 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I try to build a web site, using servlet&JSP(http://www.mycgiserver.com/~nan111/main.jsp). The decimal pointer of goods price is comma ",", I guess www.mycgiserver.com is hosted in France. The problem is that from visitor in here(Australia, or US), a decimal pointer is period ".", I have got no idea to how to build a dynamic page which is smart enough to decide which decimal pointer should be used, according to where visitors from.
Do you have any idea?
Thanks
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From our international menu.
Ingredients:
One spoonful of ServletRequest.getLocale().
A generous portion of java.text.NumberFormat.getInstance(Locale).
Plenty of ResourceBundle.
Take the ServletRequest.getLocale() and stir into the NumberFormat.getInstance(). Then format() the resultant object well. Stir in the contents of the java.util.ResourceBundle according to taste and serve hot.
- Peter (purveyor of fine internationalised cuisine)
 
nan sh
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Peter
I am going to try that.
Cheers!
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is it still true that many browsers out there don't send an ACCEPT-LANGUAGES header with their HTTP?
 
reply
    Bookmark Topic Watch Topic
  • New Topic