Home Java Java-get-example Java get System Locale



Java get System Locale
Posted on: November 1, 2008 at 12:00 AM
In this section, you will learn how to obtain the locale. We are providing you an example which will obtain the locale of the system by using the System.getProperty().

Java get System Locale

     

In this section, you will learn how to obtain the locale. We are providing you an example which will obtain the locale of the system by using the System.getProperty(). This will provide all the properties of the system.

System.getProperty("user.language")- This will return the locale of the system.

 

 

Here is the code of GetSystemLocale.java

class  GetSystemLocale
{
  public static void main(String[] args) 
  {
  String locale = System.getProperty("user.language");
  System.out.println("The Locale of the system is: "+locale);
  }
}

Output will be displayed as:

Download Source Code

Related Tags for Java get System Locale:
cidepropertiesiopropertygetsystemvilocaleusingthisidailocalieexampletolearnexameareilsectionpeincalmcaesemalllochowprosystiexawhichxampsisllmplpropereaarrtropessthstpleplpropprono


More Tutorials from this section

Ask Questions?    Discuss: Java get System Locale   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.