Locale problems
I have a locale problem. An example is 3.44 in Engliah decimals is 3.44 but in italian is 344. The below piece of code shows the code for doing that. I want to be able to say that 3.44 should be treated as 3.44 and not 344 in italian. I am writing a program which have language features so you are able to switch between languages. If you have formulas the format issue is a problem.
NumberFormat guiseppe = NumberFormat.getInstance(Locale.ITALY);
NumberFormat joe = NumberFormat.getInstance(); // defaults to Locale.US
try {
double theValue = guiseppe.parse("34.663,252").doubleValue();
System.out.println(joe.format(theValue)); // 34,663.252
}
catch (ParseException e) {}
Love to hear your opinion Java programmers.
Message was edited by:
iu433

