Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Bodgitt and Scarper Version 2.1.2: i18n

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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.
 
You are HERE! The other map is obviously wrong. Better confirm with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic