is Chinese the system language - Android java.util

Android examples for java.util:Locale

Description

is Chinese the system language

Demo Code

import java.util.Locale;

public class Main {

  public static boolean isZh() {
    if (getCurrentLauguage().equals("zh")) {
      return true;
    }//from   w  ww  . j  a va 2  s.  c om
    return false;
  }

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

}

Related Tutorials