/** * Convenience override of getDisplayNames(UCultureInfo, Comparer, string) that * uses the default collator for the locale as the comparator to * sort the display names. */ public IDictionary <string, string> GetDisplayNames(ICUService service, UCultureInfo locale, string matchID) { //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToCultureInfo().Name); return(service.GetDisplayNames(locale, col, matchID)); }
/** * Convenience override of getDisplayNames(ULocale, Comparator, string) that * uses the default collator for the locale as the comparator to * sort the display names, and null for the matchID. */ public static IDictionary <string, string> GetDisplayNames(ICUService service, ULocale locale) { //Collator col; //try //{ // col = Collator.getInstance(locale.ToLocale()); //} //catch (MissingResourceException e) //{ // // if no collator resources, we can't collate // col = null; //} CompareInfo col; try { col = CompareInfo.GetCompareInfo(locale.ToLocale().ToString()); } catch (MissingManifestResourceException e) { // if no collator resources, we can't collate col = null; } return(service.GetDisplayNames(locale, col, null)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the default collator for the locale as the comparator to sort the /// display names. /// </summary> /// public SortedList GetDisplayNames(ICUService service, ULocale locale, String matchID) { Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, matchID)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the current default ULocale as the locale, the default collator for /// the locale as the comparator to sort the display names, and null for the /// matchID. /// </summary> /// public SortedList GetDisplayNames(ICUService service) { ULocale locale = IBM.ICU.Util.ULocale.GetDefault(); Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, null)); }
/** * Convenience override of getDisplayNames(ULocale, Comparator, string) that * uses the default collator for the locale as the comparator to * sort the display names, and null for the matchID. */ public SortedDictionary <string, string> GetDisplayNames(ICUService service, ULocale locale) { //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToLocale().Name); return(service.GetDisplayNames(locale, col, null)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) /// that uses the default collator for the locale as the comparator to /// sort the display names, and null for the matchID. /// </summary> /// public static SortedList GetDisplayNames(ICUService service, ULocale locale) { Collator col = IBM.ICU.Text.Collator.GetInstance(locale); return(service.GetDisplayNames(locale, col, null)); }
/** * Convenience override of getDisplayNames(UCultureInfo, Comparator, string) that * uses the current default UCultureInfo as the locale, the default collator for * the locale as the comparator to sort the display names, and null for * the matchID. */ public IDictionary <string, string> GetDisplayNames(ICUService service) { UCultureInfo locale = UCultureInfo.CurrentCulture; //Collator col = Collator.getInstance(locale.toLocale()); CompareInfo col = CompareInfo.GetCompareInfo(locale.ToCultureInfo().Name); return(service.GetDisplayNames(locale, col, null)); }
/// <summary> /// Convenience override of getDisplayNames(ULocale, Comparator, String) that /// uses the default collator for the locale as the comparator to sort the /// display names, and null for the matchID. /// </summary> /// public static SortedList GetDisplayNames(ICUService service, ULocale locale) { Collator col; try { col = IBM.ICU.Text.Collator.GetInstance(locale); } catch (MissingManifestResourceException e) { // if no collator resources, we can't collate col = null; } return(service.GetDisplayNames(locale, col, null)); }