Obtains a simple implementation backed by {@link Localizable}.
506381
public static CauseOfBlockage fromMessage(@Nonnull final Localizable l) {
        l.getKey(); // null check
        return new CauseOfBlockage() {
            @Override
            public String getShortDescription() {
                return l.toString();
            }
        };
    }
467405
public static Set<Locale> getAvailableLocales() {
        Locale[] l = DecimalFormatSymbols.getAvailableLocales();
        return new HashSet<Locale>(Arrays.asList(l));
    }
227916
Set<Locale> getImplLocales(Class<?> c10nInterface) {
        Set<Locale> res = new HashSet<Locale>();
        C10NImplementationBinder<?> binder = binders.get(c10nInterface);
        if (binder != null) {
            res.addAll(binder.bindings.keySet());
        }
        return res;
    }
877328
private ResourceBundle getBundle(Locale locale) {
        return ResourceBundle.getBundle(bundleName, locale, loader, new UTF8Control());
    }
1218015
Map<Class<? extends Annotation>, Set<Locale>> getAnnotationToLocaleMapping() {
        Map<Class<? extends Annotation>, Set<Locale>> res = new HashMap<Class<? extends Annotation>, Set<Locale>>();
        for (Entry<Class<? extends Annotation>, C10NAnnotationBinder> entry : annotationBinders.entrySet()) {
            Set<Locale> locales = getLocales(entry.getKey(), res);
            locales.add(entry.getValue().getLocale());
        }
        return res;
    }
245268
public static Locale getLocaleFromString(String locale) throws LocaleException {
		for(Locale l : Locale.getAvailableLocales()) {
			if(locale.toLowerCase().equals(l.toString().toLowerCase())) {
				return l;
			}
		}
		throw new LocaleException();
	}
621956
DataBundle get(ULocale locale) {
        DataBundle result = cache.get(locale);
        if (result == null) {
            result = load(locale);
            cache.put(locale, result);
        }
        return result;
    }
74812
public Translator<T> copy() {
        Translator<T> trans = new Translator<T>();

        if( isBundleBased() ) {
            for( Translation<T> t : values() ) {
                Locale loc = t.getLocale();
                
                trans.store(loc, t.getData());
            }
        }
        else {
            for( String lang : translations.keySet() ) {
                Map<String,Translation<T>> map = translations.get(lang);
                
                for( String ctry : map.keySet() ) {
                    trans.store(lang, ctry, map.get(ctry));
                }
            }
        }
        return trans;
    }
1246527
public static <T extends LocalizableResource> void put(Class<T> cls, T m) {
        put(cls, null, m);
    }
276170
public static <T extends LocalizableResource> void put(Class<T> cls, String locale, T m) {
        Map<String, LocalizableResource> localeCache = getLocaleCache(cls);
        synchronized (cache) {
            localeCache.put(locale, m);
        }
    }
90644
private boolean isLocalizationAvailable(
                                            BaseDestinationHandler baseDestinationHandler,
                                            DestinationAvailability destinationAvailability)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isLocalizationAvailable", new Object[] { baseDestinationHandler, destinationAvailability });

        boolean available = false;
        if (baseDestinationHandler.hasLocal())
        {
            // Look at the stream for the destination which represents all localizations
            LocalizationPoint localizationPoint = baseDestinationHandler.getQueuePoint(messageProcessor.getMessagingEngineUuid());

            if (destinationAvailability == DestinationAvailability.SEND)
            {
                available = localizationPoint.isSendAllowed();
            }
            else
            {
                available = true;
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isLocalizationAvailable", new Object[] { new Boolean(available) });
        return available;
    }
1319399
public static CompactDecimalFormat getInstance(Locale locale, CompactStyle style) {
        return new CompactDecimalFormat(ULocale.forLocale(locale), style);
    }
1217389
@GET
    @Path("/{localeCode}")
    @Produces(MediaType.APPLICATION_JSON)
    @RequiresPermissions(I18nPermissions.LOCALE_READ)
    public Response getSupportedLocale(@PathParam("localeCode") String localeCode) {
        WebAssertions.assertNotNull(localeCode, "The locale should not be null");
        LocaleRepresentation locale = supportedLocaleFinder.findSupportedLocale(localeCode);
        if (locale != null) {
			return Response.ok(locale).build();
		}
        return Response.status(Response.Status.NOT_FOUND).build();
    }
87199
@GET
    @Path("/{localeId}")
    @Produces(MediaType.APPLICATION_JSON)
    @RequiresPermissions(I18nPermissions.LOCALE_READ)
    public Response getAvailableLocale(@PathParam("localeId") String localeId) {
        WebAssertions.assertNotBlank(localeId, LOCALE_SHOULD_NOT_BE_BLANK);
        LocaleRepresentation availableLocale = localeFinder.findAvailableLocale(localeId);
        if (availableLocale != null) {
            return Response.ok(availableLocale).build();
        }
        return Response.status(Response.Status.NOT_FOUND).build();
    }
991624
public static final LocaleData getInstance(ULocale locale) {
        LocaleData ld = new LocaleData();
        ld.bundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, locale);
        ld.langBundle = (ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_LANG_BASE_NAME, locale);
        ld.noSubstitute = false;
        return ld;
    }
996538
public void addRequestedLocalization(final Object node, final String key, final String domain, final String locale, final Localization localization) {

		final GenericProperty keyKey    = new GenericProperty("key");
		final GenericProperty domainKey = new GenericProperty("domain");
		final GenericProperty localeKey = new GenericProperty("locale");
		final GenericProperty nodeKey   = new GenericProperty("node");

		boolean notContained = true;
		for (GraphObject gom : localizations) {
			if (notContained) {

				if (gom.getProperty(keyKey).equals(key) && gom.getProperty(domainKey).equals(domain) && gom.getProperty(localeKey).equals(locale)) {

					final GraphObject prevNode = (GraphObject)gom.getProperty(nodeKey);
					if (prevNode != null && node != null && prevNode.getUuid().equals(((GraphObject)node).getUuid())) {
						notContained = false;
					}
				}
			}
		}

		if (notContained) {

			final Map<String, Object> data = new HashMap();
			data.put("node", node);
			data.put("key", key);
			data.put("domain", domain);
			data.put("locale", locale);
			data.put("localization", localization);

			GraphObjectMap converted = GraphObjectMap.fromMap(data);

			if (!localizations.contains(converted)) {
				localizations.add(converted);
			}
		}
	}
677269
public Object get(ULocale locale, ULocale[] actualReturn) {
        return get(locale, LocaleKey.KIND_ANY, actualReturn);
    }