Forums Register Login

Servlet&JSP: Decimal pointer problem

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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)
+Pie Number of slices to send: Send
Thank you Peter
I am going to try that.
Cheers!
+Pie Number of slices to send: Send
is it still true that many browsers out there don't send an ACCEPT-LANGUAGES header with their HTTP?
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 584 times.
Similar Threads
Which class dose servlet usually inherit from??
SCJD development team accepts new member again!
Hierarchy of Servlet Please
free web hosting
jsp newbie - how to run .jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:13:40.