• 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
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Bodgitt and Scarper Version 2.1.2: i18n

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have 2 questions:

I'm living in Switzerland and all applications that I had to implement were internationalized (German, French, Italian, English).

In the assignment it is only said:
<The character encoding is 8 bit US ASCII.>

Therefore the locale of the application is: Locale.US.
Question 1: Is that right?

I can put the locale in the file <suncertify.properties> and the user can choose the locale he wants to use.
To read the rates (hourly charge) in <db-2x2.db> I use a Currency Formatter. If the user changes the locale, then no rate can be parsed by the Currency Formatter.

Question 2: Is it better to hard code the locale instead of putting in the property file?

Thank you for your answers.
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would leave out the locale stuff completely. You're only getting yourself in unnecessary trouble.

Why would you want to use a currency formatter? The application doesn't do anything with the price. The only thing that it does with price is show the contents of the field to the user, so you can just read it as a string, and show it as is.

Also, no numbers are to be entered, compared or interpreted by the user, so also no number formatting is needed, so also no internationalization is needed for that.

So you best leave the i18n stuff completely out.

Rinke
 
Jean-Claude Rouvinez
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Rinke Hoekstra for your advice.
I will left the 18n functionalities out of the application.

I don't agree with you when you say


no numbers are to be entered, compared or interpreted by the user, so also no number formatting is needed, ...



It is written in the assignment:


Your user interface should be designed with the expectation of future functionality
enhancements, and it should establish a framework ...



and


Object-oriented design (30 points)



so I think that it is better to convert the into business objects, i.e. in numbers when necessary.
reply
    Bookmark Topic Watch Topic
  • New Topic