Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.Locale;
import android.content.Context;

public class Main {
    public static boolean isEN(Context context) {
        Locale locale = context.getResources().getConfiguration().locale;
        String language = locale.getLanguage();
        if (language.endsWith("en")) {
            return true;
        }
        return false;
    }

    public static String getLanguage() {
        return Locale.getDefault().getLanguage();
    }
}