src/main/java/com/teamunify/i18n/I.java
public static boolean supports(String lang) {
    if (lang == null || lang.length() == 0)
      return false;
    String parts[] = lang.split("_");
    if (parts.length == 1)
      return supports(lang, "");
    else if (parts.length == 2)
      return supports(parts[0], parts[1]);

    return false;
  }
/**
   * Test if a language code is supported by our translation files.
   *
   * @param lang The language code, e.g. "de".
   * @return True if the language has translations.
   */
Test if a language code is supported by our translation files.
@param lang The language code, e.g. "de".
@return True if the language has translations.
Test if a language code is supported by our translation files . @param lang The language code e . g . " de " . @return True if the language has translations .
public static boolean supports(String lang) {
    if (lang == null || lang.length() == 0)
      return false;
    String parts[] = lang.split("_");
    if (parts.length == 1)
      return supports(lang, "");
    else if (parts.length == 2)
      return supports(parts[0], parts[1]);
    return false;
  }
public static boolean supports ( String lang ) { if ( lang == null || lang . length ( ) == 0 ) return false ; String parts [ ] = lang . split ( "_" ) ; if ( parts . length == 1 ) return supports ( lang , "" ) ; else if ( parts . length == 2 ) return supports ( parts [ 0 ] , parts [ 1 ] ) ; return false ; }
Test if a language code is supported by our translation files.
Test if a language code is supported by our translation files .