Wenn Sie den ISO-Ländercode "US", "FR", wie Sie die Gebietsschema-code (`Locale.UNS`, `Locale.FRANKREICHS")?

Wenn Sie das Land code US, FR (ISO-3166-1 alpha-2-Ländercode), wie tun, bekommen Sie die Gebietsschema-code ( Locale.US , Locale.FRANCE), so etwas zu tun:

System.out.println(DecimalFormat.getCurrencyInstance(Locale.US).format(12.34));
System.out.println(DecimalFormat.getCurrencyInstance(Locale.FRANCE).format(12.34));

$12.34
12,34 

InformationsquelleAutor Pascal | 2011-07-02

Schreibe einen Kommentar