public boolean getHasLanguageKey() {
   return ((mLanguageSwitchMode == LANGUAGE_SWICH_TOGGLE)
           || (mLanguageSwitchMode == LANGUAGE_SWICH_BOTH))
       && (mLanguageSwitcher != null)
       && mLanguageSwitcher.getLanguageSwitchEnabled();
 }
 /**
  * Sets the input locale, when there are multiple locales for input. If no locale switching is
  * required, then the locale should be set to null.
  *
  * @param locale the current input locale, or null for default locale with no locale button.
  */
 public void setLanguageSwitcher(LanguageSwitcher languageSwitcher) {
   mLanguageSwitcher = languageSwitcher;
   mInputLocale = mLanguageSwitcher.getInputLocale();
 }