static boolean compareLocaleNames(Locale locale,String name){
  return name.equalsIgnoreCase(locale.toString()) || name.equalsIgnoreCase(getName(locale));
}

static boolean compareLocaleNames ( Locale locale , String name ) { return name . equalsIgnoreCase ( locale . toString ( ) ) || name . equalsIgnoreCase ( getName ( locale ) ) ; }
compare name name of the locale with the given name . the case of the name is ignored .
