prefix = "##DUMMY";
	private static List initAvailableLocales() {		String locPath;		String loc;		List aList = new LinkedList();		long start = System.currentTimeMillis();		// todo: it seems that the dialog can't be displayed because all this		// is running in the Swing event thread. Need to find a better way...//		JDialog dialog = new JDialog(GalleryRemote.getInstance().mainFrame, "Please wait...");//		dialog.getContentPane().add("Center", new JLabel("<HTML>Parsing list of locales for this platform." +//				"<br>This can take between 1 and 10 seconds..."));//		dialog.pack();//		DialogUtil.center(dialog);//		dialog.setVisible(true);//		Thread.yield();		Log.log(Log.LEVEL_TRACE, MODULE, "Getting the list of locales");		// this call is apparently very slow...		Locale[] list = Locale.getAvailableLocales();		Log.log(Log.LEVEL_TRACE, MODULE, "The platform supports " + list.length + " locales. Pruning...");		String prefix = "##DUMMY";		for (int i = 0; i < list.length; i++) {			loc = list[i].toString();			if (!loc.startsWith(prefix)) {				prefix = loc;				locPath = RESPATH + "_" + loc + ".properties";				if (ClassLoader.getSystemClassLoader().getResource(locPath) != null) {					aList.add(list[i]);				}			}		}		Log.log(Log.LEVEL_TRACE, MODULE, "Pruned locales in " + (System.currentTimeMillis() - start) + "ms");		//dialog.setVisible(false);		return aList;	}