KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > java > util > Locale

java.util
Class Locale

java.lang.Object
  extended by java.util.Locale
All Implemented Interfaces:
Serializable, Cloneable
See Also:
Top Examples, Source Code, ResourceBundle, Format, NumberFormat, Collator

public static final Locale CANADA
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[199]Get the user preferred Locale from the request
By Anonymous on 2003/03/26 09:31:55  Rate
// Get the user's preferred Locale from the request 
 Locale requestLocale = request.getLocale (  ) ; 
  
  
 //CANADA


public static final Locale CANADA_FRENCH
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale CHINA
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale CHINESE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object clone()
See Also:
Cloneable
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale ENGLISH
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean equals(Object obj)
See Also:
Hashtable, Object.hashCode()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale FRANCE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale FRENCH
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale GERMAN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale GERMANY
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Locale[] getAvailableLocales()
See Also:
Locale.US
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getCountry()
See Also:
getDisplayCountry()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static Locale getDefault()
See Also:
setDefault
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final String getDisplayCountry()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getDisplayCountry(Locale inLocale)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final String getDisplayLanguage()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getDisplayLanguage(Locale inLocale)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final String getDisplayName()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getDisplayName(Locale inLocale)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final String getDisplayVariant()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getDisplayVariant(Locale inLocale)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getISO3Country()
                      throws MissingResourceException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getISO3Language()
                       throws MissingResourceException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String[] getISOCountries()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static String[] getISOLanguages()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getLanguage()
See Also:
getDisplayLanguage()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public String getVariant()
See Also:
getDisplayVariant()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int hashCode()
See Also:
Hashtable, Object.equals(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale ITALIAN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale ITALY
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale JAPAN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale JAPANESE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1526]To set Date for Locale as Japan
By deepti on 2005/09/05 00:53:25  Rate
To set Date for Locale as Japan

public static final Locale KOREA
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale KOREAN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Locale(String language)
See Also:
NullPointerException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[1854]Locales Test
By Anonymous on 2006/12/15 14:17:10  Rate
import java.util.*; // for Locale 
 import java.text.*; // for DateFormat 
  
  
 public class LocalesTest  {  
   static public void main  ( String [  ]  args )   {  
     Locale myLocalesArray [   ]  = DateFormat.getAvail ableLocales  (  ) ; 
     for  ( Locale myCurrentLocale : myLocalesArray )   {  
       System.out.println  ( myCurrentLocale. toString  (  )  ) ; 
      }  
    }  
  }  
  
  
 OUTPUT: 
  
  
 ar 
 ar_AE 
 ... 
 ja 
 ja_JP 
 ko 
 ko_KR 
 ... 
 uk 
 uk_UA 
 en_US 
 en 
 


public Locale(String language,
              String country)
See Also:
NullPointerException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[865]Create different Locale
By Anonymous on 2004/08/24 20:56:15  Rate
Local us = new Locale ( "en", "US" ) ; 
 Local fr = new Locale ( "fr", "FR" ) ; 
  
  
 


public Locale(String language,
              String country,
              String variant)
See Also:
NullPointerException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale PRC
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static void setDefault(Locale newLocale)
See Also:
PropertyPermission, SecurityManager.checkPermission(java.security.Permission), NullPointerException, SecurityException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale SIMPLIFIED_CHINESE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale TAIWAN
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public final String toString()
See Also:
getDisplayName(), Object
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale TRADITIONAL_CHINESE
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale UK
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public static final Locale US
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags