Ejemplo n.º 1
0
        /**
         * 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));
        }
Ejemplo n.º 2
0
        /**
         * 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));
        }
Ejemplo n.º 3
0
        /// <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));
        }
Ejemplo n.º 4
0
        /// <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));
        }
Ejemplo n.º 5
0
        /**
         * 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));
        }
Ejemplo n.º 6
0
            /// <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));
            }
Ejemplo n.º 7
0
        /**
         * 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));
        }
Ejemplo n.º 8
0
        /// <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));
        }