/** * Produces a sorted list of locales according to locale preferences obtained from several * places. The following priority is given: session, user, browser, portal, and jvm. * * @return the sorted list of locales */ public List<Locale> getLocales() { // Need logic to construct ordered locale list. // Consider creating a separate ILocaleResolver // interface to do this work. final List rslt = new ArrayList(); // Add highest priority locales first addToLocaleList(rslt, sessionLocales); addToLocaleList(rslt, userLocales); // We will ignore browser locales until we know how to // translate them into proper java.util.Locales // addToLocaleList(locales, browserLocales); addToLocaleList(rslt, portalLocales); return rslt; }
/** * Produces a sorted list of locales according to locale preferences obtained from several * places. The following priority is given: session, user, browser, portal, and jvm. * * @return the sorted list of locales */ public List<Locale> getLocales() { // Need logic to construct ordered locale list. // Consider creating a separate ILocaleResolver // interface to do this work. final List rslt = new ArrayList(); // Add highest priority locales first addToLocaleList(rslt, sessionLocales); addToLocaleList(rslt, userLocales); // We will ignore browser locales until we know how to // translate them into proper java.util.Locales // addToLocaleList(locales, browserLocales); addToLocaleList(rslt, portalLocales); return rslt; }