Code example for Locale

Methods: getCountry, getVariant

0
		return loc.getDisplayName(loc);
	} 
 
	private static String getLocaleCode(Locale loc) {
		String result = loc.getLanguage();
		if (loc.getCountry().length() > 0)
			result += "_" + loc.getCountry();
		if (loc.getVariant().length() > 0)
			result += "_" + loc.getVariant();
		return result;
	} 
 
	/** 
	 * Retrieve the locale code at a specific position in the list. 
	 */ 
	public String getLocale(int pos) {
		return localeCodes[pos];
	} 
 
	/** 
	 * Retrieve the position where the specified locale code is, or 0 if it was