get Current Language from Context - Android android.content

Android examples for android.content:Context

Description

get Current Language from Context

Demo Code


//package com.java2s;

import android.content.Context;

public class Main {

    public static String getCurrentLanguage(Context context) {
        String language = null;/*from   w w w. j  a v a2  s.  co  m*/
        language = context.getResources().getConfiguration().locale
                .getCountry();
        return language;
    }
}

Related Tutorials