• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

I18N end to end with pracital example

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please advise on Best Practices:
--------------------------------
Let's assume that there is a company by name "ABC Books" which sells books online. The ABC company has the server in NY and users from India access the website to order books.
The requirement is that the same site when accessed in India will have to localize only (for simplicity) date and currency. Other content remains the same. The application should be *internationlized* so that users from other countries can also buy books. For this example, I'm using India.
The users order book from India. When the user orders book, he/she should see the indian price, NOT in dollars.
When User places an order the date and amount are captured. So, when
the user comes back later to view the placed order, he/she should see local(indian) date and amount in indian rupees.

1) How does Java I18N help in this requirement? Please clarify how I18N can be used from UI till backend.

2) Is the following approach correct?
Use one currency and date in DB. the application code does the conversion:
convert all Indian dates to NY dates
convert all indian ruppees to USD
If I use I18N, Can I get this conversion done by I18N itself or Should the app code do the conversion using Locale?

I tried to find answers in blueprint / java tutorial. I didn't find how I18N can be used from UI till backend. Most of them dealt with only with presentation part.

Please share your inputs.

Thanks for reading..!
[ November 18, 2004: Message edited by: sat architect ]
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I18N does not cover currency conversion.
You can have a look at J2SE tutorial's I18N chapter.

It only cover static text in difference language. According to locale, choose right text string in Unicode.

If you need currency conversion, you need to program extra.
reply
    Bookmark Topic Watch Topic
  • New Topic