package gotowe.p36_lokalizacja.formatowanie;

import java.util.Currency;
import java.util.Locale;

public class Waluty {

	public static void currencyInfo(Locale locale) {
		Currency currency = Currency.getInstance(locale);
		System.out.println("code: "
				+ currency.getCurrencyCode());
		System.out.println("symbol: "
				+ currency.getSymbol());
		System.out.println("displayName: "
				+ currency.getDisplayName());
	}


	public static void main(String[] args) {
		Locale[] all = {
			new Locale("pl", "PL"),
			new Locale("de", "DE"),
			new Locale("fr", "FR"),
			new Locale("en", "GB"),
			new Locale("en", "US"),
			//new Locale("en"),
		};

		for (Locale locale : all) {
			System.out.println("Dla locali " + locale.toString());
			currencyInfo(locale);
			System.out.println();
		}
	}

}
