public List <Locale> getAvailableLocales() { List <Locale> availableLocales = new List <Locale>(); List <Language> languages; try { languages = LanguageDao.FindAll(); } catch (InstanceNotFoundException <Language> ex) { throw new InternalErrorException(ex); } foreach (Language language in languages) { foreach (Country country in language.Countries) { availableLocales.Add(new Locale(language.languageCode, country.countryCode)); } } return(availableLocales); }
public Dictionary <string, string> getAvailableLanguages() { Dictionary <string, string> availableLanguages = new Dictionary <string, string>(); List <Language> languages; try { languages = LanguageDao.FindAll(); } catch (InstanceNotFoundException <Language> ex) { throw new InternalErrorException(ex); } foreach (Language language in languages) { availableLanguages.Add(language.languageCode, language.languageName); } return(availableLanguages); }