Get all locales

ReturnMethodSummary
static Locale[]getAvailableLocales()Returns an array of all locales for which the get*Instance methods of this class can return localized instances.

import java.text.DateFormat;
import java.util.Locale;

public class Main{
  public static void main(String args[]) {
    Locale[]  locales = DateFormat.getDateInstance().getAvailableLocales();
    for(Locale l: locales){
      System.out.println(l.getDisplayCountry());
    }
   }
}

The output:


Japan
Peru

Japan
Panama
Bosnia and Herzegovina

Guatemala
United Arab Emirates
Norway
Albania

Iraq
Yemen

Portugal
Cyprus
Qatar
Macedonia

Switzerland
United States
Finland


Malta
Slovenia
Slovakia

Turkey


Saudi Arabia

United Kingdom
Serbia and Montenegro


New Zealand
Norway
Lithuania
Nicaragua

Ireland
Belgium
Spain
Lebanon

Canada
Estonia
Kuwait
Serbia
United States
Mexico
Sudan
Indonesia


Uruguay
Latvia

Brazil
Syria


Dominican Republic
Switzerland
India
Venezuela
Bahrain
Philippines
Tunisia

Austria

Netherlands
Ecuador
Taiwan
Jordan

Iceland
Colombia
Costa Rica
Chile
Egypt
South Africa
Thailand
Greece
Italy

Hungary

Ireland
Ukraine
Poland
Luxembourg
Belgium
India
Spain
Morocco
Bolivia
Australia

Singapore


El Salvador
Russia
South Korea

Algeria
Vietnam
Montenegro

Libya

China
Belarus
Hong Kong

Israel
Bulgaria

Malta
Paraguay

France
Czech Republic
Switzerland
Romania
Puerto Rico
Canada
Germany

Luxembourg

Argentina

Malaysia
Croatia
Singapore



Oman

Thailand


Sweden
Denmark
Honduras
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.