Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.content.Context;

public class Main {
    /**
     * check if the phone use Chinese as first language
     * @param context
     * @return
     */
    public static boolean isChineseLaguage(Context context) {
        if (context.getResources().getConfiguration().locale.getCountry().equals("CN")
                || context.getResources().getConfiguration().locale.getCountry().equals("TW")) {
            return true;
        } else {
            return false;
        }
    }
}