<p>Gets a resource bundle for given calendar type and locale. </p>

@param   calendarType    calendar type (usually non-gregorian)
@param   desired         locale (language and/or country)
@return  {@code ResourceBundle}
@since   3.10/4.7
548978
static PropertyBundle getBundle(
        String calendarType,
        Locale desired
    ) {

        return PropertyBundle.load(
            "names/" + calendarType,
            LANGUAGES.contains(LanguageMatch.getAlias(desired)) ? desired : Locale.ROOT);

    }
984536
public static ResourceBundle getResourceBundle(String bundleName, Locale locale)
    {
        return ResourceBundle.getBundle(bundleName, locale);
    }
137984
public static final <T extends Calendar> Function<T, LocalTime> calendarToLocalTime(DateTimeZone dateTimeZone) {
		return FnLocalTime.calendarToLocalTime(dateTimeZone);
	}
1165524
public static ResourceBundleWrapper getBundleInstance(String baseName, String localeID,
            ClassLoader root, boolean disableFallback) {
        if (root == null) {
            root = ClassLoaderUtil.getClassLoader();
        }
        ResourceBundleWrapper b;
        if (disableFallback) {
            b = instantiateBundle(baseName, localeID, null, root, disableFallback);
        } else {
            b = instantiateBundle(baseName, localeID, ULocale.getDefault().getBaseName(),
                    root, disableFallback);
        }
        if(b==null){
            String separator ="_";
            if(baseName.indexOf('/')>=0){
                separator = "/";
            }
            throw new MissingResourceException("Could not find the bundle "+ baseName+separator+ localeID,"","");
        }
        return b;
    }
103725
public static <T> T getBundle(final Class<T> type) {
        return doPrivileged(new PrivilegedAction<T>() {
            public T run() {
                final Locale locale = Locale.getDefault();
                final String lang = locale.getLanguage();
                final String country = locale.getCountry();
                final String variant = locale.getVariant();

                Class<? extends T> bundleClass = null;
                if (variant != null && !variant.isEmpty()) try {
                    bundleClass = Class.forName(join(type.getName(), "$bundle", lang, country, variant), true, type.getClassLoader()).asSubclass(type);
                } catch (ClassNotFoundException e) {
                    // ignore
                }
                if (bundleClass == null && country != null && !country.isEmpty()) try {
                    bundleClass = Class.forName(join(type.getName(), "$bundle", lang, country, null), true, type.getClassLoader()).asSubclass(type);
                } catch (ClassNotFoundException e) {
                    // ignore
                }
                if (bundleClass == null && lang != null && !lang.isEmpty()) try {
                    bundleClass = Class.forName(join(type.getName(), "$bundle", lang, null, null), true, type.getClassLoader()).asSubclass(type);
                } catch (ClassNotFoundException e) {
                    // ignore
                }
                if (bundleClass == null) try {
                    bundleClass = Class.forName(join(type.getName(), "$bundle", null, null, null), true, type.getClassLoader()).asSubclass(type);
                } catch (ClassNotFoundException e) {
                    throw new IllegalArgumentException("Invalid bundle " + type + " (implementation not found)");
                }
                final Field field;
                try {
                    field = bundleClass.getField("INSTANCE");
                } catch (NoSuchFieldException e) {
                    throw new IllegalArgumentException("Bundle implementation " + bundleClass + " has no instance field");
                }
                try {
                    return type.cast(field.get(null));
                } catch (IllegalAccessException e) {
                    throw new IllegalArgumentException("Bundle implementation " + bundleClass + " could not be instantiated", e);
                }
            }
        });
    }
29338
public static RefCapablePropertyResourceBundle
            getBundle(String baseName, Locale locale, ClassLoader loader) {
        return getRef(baseName,
                ResourceBundle.getBundle(baseName, locale, loader), loader);
    }
844496
private static UResourceBundle measurementTypeBundleForLocale(ULocale locale, String measurementType){
        // Much of this is taken from getCalendarType in impl/CalendarUtil.java
        UResourceBundle measTypeBundle = null;
        String region = ULocale.getRegionForSupplementalData(locale, true);
        try {
            UResourceBundle rb = UResourceBundle.getBundleInstance(
                    ICUData.ICU_BASE_NAME,
                    "supplementalData",
                    ICUResourceBundle.ICU_DATA_CLASS_LOADER);
            UResourceBundle measurementData = rb.get("measurementData");
            UResourceBundle measDataBundle = null;
            try {
                measDataBundle = measurementData.get(region);
                measTypeBundle = measDataBundle.get(measurementType);
            } catch (MissingResourceException mre) {
                // use "001" as fallback
                measDataBundle = measurementData.get("001");
                measTypeBundle = measDataBundle.get(measurementType);
            }
        } catch (MissingResourceException mre) {
            // fall through
        }
        return measTypeBundle;
    }
542806
public CalendarFormatter getCalendarFormatter(CLDR.Locale locale) {
    locale = bundleMatch(locale);
    CalendarFormatter formatter = CALENDAR_FORMATTERS.get(locale);
    return formatter == null ? CALENDAR_FORMATTERS.get(CLDR.Locale.en_US) : formatter;
  }
44011
public Calendar toCalendar(T dateTime, Locale locale) {
    return toDateTime(dateTime).toCalendar(locale);
  }
1151639
public static ResourceBundle getResourceBundle(File location, String name, Locale locale) {
        File[] files = new File[] { new File(location, name + "_" + locale.toString() + RESOURCE_FILE_EXT),
                                   new File(location, name + "_" + locale.getLanguage() + RESOURCE_FILE_EXT),
                                   new File(location, name + RESOURCE_FILE_EXT) };
        for (File file : files) {
            if (exists(file)) {
                try {
                    return new PropertyResourceBundle(new FileReader(file));
                } catch (IOException e) {
                    if (logger.isLoggable(Level.FINE)) {
                        logger.fine("The resource file was not loaded. The exception is " + e.getMessage());
                    }
                }
            }
        }
        return null;
    }
115272
protected function getDateTimePattern($datetype, $timetype, $calendar = \IntlDateFormatter::GREGORIAN)
    {
        if (is_int($datetype) && is_int($timetype)) {
            return null;
        }
        
        return $this->getDatePattern(
            isset($datetype) ? $datetype : \IntlDateFormatter::SHORT,
            isset($timetype) ? $timetype : \IntlDateFormatter::SHORT,
            $calendar
        );
    }
553523
protected Calendar createJavaCalendar ()
  {
    return Calendar.getInstance (getTimeZone () != null ? getTimeZone () : TimeZone.getDefault (),
                                 Locale.getDefault (Locale.Category.FORMAT));
  }
357756
@Deprecated
    @Override
    protected void initializeData(ULocale loc, ICUResourceBundle b, String calendarType) {
        super.initializeData(loc, b, calendarType);
        initializeIsLeapMonth();
    }
1210352
private Strategy getLocaleSpecificStrategy(final int field, final Calendar definingCalendar) {
		final ConcurrentMap<Locale, Strategy> cache = getCache(field);
		Strategy strategy = cache.get(locale);
		if (strategy == null) {
			strategy = field == Calendar.ZONE_OFFSET ? new TimeZoneStrategy(locale) : new CaseInsensitiveTextStrategy(field, definingCalendar, locale);
			final Strategy inCache = cache.putIfAbsent(locale, strategy);
			if (inCache != null) {
				return inCache;
			}
		}
		return strategy;
	}
1200762
private CmsMessageBundleEditorTypes.BundleType initBundleType() {

        String resourceTypeName = OpenCms.getResourceManager().getResourceType(m_resource).getTypeName();
        return CmsMessageBundleEditorTypes.BundleType.toBundleType(resourceTypeName);
    }
258854
def get_calendar(self, language_abbr=None):
        """"""
        if language_abbr:
            if not self._is_current_language(language_abbr):
                self._switch_language(language_abbr)
            return self.user_data.language_data[language_abbr]['calendar']
        else:
            return self.user_data.calendar
757191
@SuppressWarnings("deprecation")
  private ResourceBundle findResourceBundle(Object o) {
    ResourceBundle result = null;

    Parameters p = o.getClass().getAnnotation(Parameters.class);
    if (p != null && ! isEmpty(p.resourceBundle())) {
      result = ResourceBundle.getBundle(p.resourceBundle(), Locale.getDefault());
    } else {
      com.beust.jcommander.ResourceBundle a = o.getClass().getAnnotation(
          com.beust.jcommander.ResourceBundle.class);
      if (a != null && ! isEmpty(a.value())) {
        result = ResourceBundle.getBundle(a.value(), Locale.getDefault());
      }
    }

    return result;
  }