get Current Country Language - Android Internationalization

Android examples for Internationalization:Locale

Description

get Current Country Language

Demo Code


//package com.java2s;

import android.content.Context;

public class Main {
    public static String getCurCountryLan(Context context) {
        return context.getResources().getConfiguration().locale
                .getLanguage()//from  w ww.  j av  a2 s  .c  o m
                + "-"
                + context.getResources().getConfiguration().locale
                        .getCountry();
    }
}

Related Tutorials