code: private void setLocale(Locale l, boolean select) {
  		Locale oldLocale = locale;
  		locale = l;
  		int n = 0;
  
  		if (select) {
  			for (int i = 0; i < localeCount; i++) {
  				if (locales[i].getCountry().length() > 0) {
  					if (locales[i].equals(locale))
  						setSelectedIndex(n);
  					n += 1;
  				}
  			}
  		}
  
  		firePropertyChange("locale", oldLocale, locale);
  		if(component != null) {
  		    component.setLocale(l);
  		}
  	}
docs: Sets the locale.
  
  @see #getLocale