get System Language - Android java.util

Android examples for java.util:Locale

Description

get System Language

Demo Code


//package com.java2s;

import java.util.Locale;

public class Main {

    public static String getLanguage() {
        String language = null;/*from  w  ww.  j  av a2s  .  c  o m*/
        try {
            language = Locale.getDefault().getLanguage();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return language;
    }
}

Related Tutorials