Java tutorial
//package com.java2s; import java.util.Locale; public class Main { /** * Returns the language code for this Locale or the empty string if no language was set. */ public static String getLanguage() { String language = null; try { language = Locale.getDefault().getLanguage(); } catch (Exception e) { e.printStackTrace(); } return language; } }