<p>
Same as {@link #prettyTimeFormat()} for the specified locale.
</p>

@param locale
Target locale
@return PrettyTimeFormat instance
@see PrettyTimeFormat
1137
public static PrettyTimeFormat prettyTimeFormat(final Locale locale)
    {
        return withinLocale(new Callable<PrettyTimeFormat>()
        {
            public PrettyTimeFormat call() throws Exception
            {
                return context.get().getPrettyTimeFormat();
            }
        }, locale);
    }
909771
private CellFormatResult getCellValue(final POICell poiCell, final Locale locale) {

        final short formatIndex = poiCell.getFormatIndex();
        final String formatPattern = poiCell.getFormatPattern();

        if(formatterResolver.canResolve(formatIndex)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatIndex);
            return cellFormatter.format(poiCell, locale);

        } else if(formatterResolver.canResolve(formatPattern)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatPattern);
            return cellFormatter.format(poiCell, locale);

        } else {
            // キャッシュに存在しない場合
            final CellFormatter cellFormatter = formatterResolver.createFormatter(formatPattern) ;
            if(isCache()) {
                formatterResolver.registerFormatter(formatPattern, cellFormatter);
            }
            return cellFormatter.format(poiCell, locale);

        }
    }
1247120
public static String getTimeAgo(final long time, final Locale locale) {
        final BeanManager beanManager = BeanManager.getInstance();
        final LangPropsService langService = beanManager.getReference(LangPropsService.class);
        final Map<String, String> langs = langService.getAll(locale);

        final long diff = System.currentTimeMillis() - time;
        long r;

        if (diff > YEAR_UNIT) {
            r = diff / YEAR_UNIT;

            return r + " " + langs.get("yearsAgoLabel");
        }

        if (diff > MONTH_UNIT) {
            r = diff / MONTH_UNIT;

            return r + " " + langs.get("monthsAgoLabel");
        }

        if (diff > WEEK_UNIT) {
            r = diff / WEEK_UNIT;

            return r + " " + langs.get("weeksAgoLabel");
        }

        if (diff > DAY_UNIT) {
            r = diff / DAY_UNIT;

            return r + " " + langs.get("daysAgoLabel");
        }

        if (diff > HOUR_UNIT) {
            r = diff / HOUR_UNIT;

            return r + " " + langs.get("hoursAgoLabel");
        }

        if (diff > MINUTE_UNIT) {
            r = diff / MINUTE_UNIT;

            return r + " " + langs.get("minutesAgoLabel");
        }

        return langs.get("justNowLabel");
    }
24971
public static ArrayList<DateTimeFormatter> getExtraTimeParsingFormatsForLocale(Locale locale) {
        // Create some variables that we will need.
        String language = locale.getLanguage();
        String[] definedFormats = null;

        // Get the list of extra parsing formats for the language of the locale.
        if ("en".equals(language)) {
            definedFormats = extraParsingFormatsForLanguage_en;
        }

        // If no extra parsing formats were found, then return an empty list.
        ArrayList<DateTimeFormatter> extraParsingFormatters = new ArrayList<DateTimeFormatter>();
        if (definedFormats == null) {
            return extraParsingFormatters;
        }

        // Create the parsing formatters from the defined formats, and add them to the results list.
        DateTimeFormatter formatter;
        for (String formatString : definedFormats) {
            formatter = new DateTimeFormatterBuilder().parseLenient().parseCaseInsensitive().
                    appendPattern(formatString).toFormatter(locale);
            extraParsingFormatters.add(formatter);
        }

        // Return the results.
        return extraParsingFormatters;
    }
966663
public static String formatDate(final Date value, final Locale locale)
    {
        return withinLocale(new Callable<String>()
        {
            public String call() throws Exception
            {
                return formatDate(value);
            }
        }, locale);
    }
319901
public Translation get(String locale) {
        locale = locale.replace("-", "_");
        Translation tr = translations.get(locale);
        if (locale.contains("_") && tr == null)
            tr = translations.get(locale.substring(0, 2));

        return tr;
    }
78479
public static Locale fromString(final String locale) {
        final String[] data = Strings.split(locale, '_');
        if (data.length == 1) {
            return new Locale(data[0]);
        } else if (data.length == 2) {
            return new Locale(data[0], data[1]);
        } else if (data.length == 3) {
            return new Locale(data[0], data[1], data[2]);
        }
        throw new IllegalArgumentException("Invalid locale string: " + locale);
    }
1372071
public static FastDateFormat getDateTimeInstance(final int dateStyle, final int timeStyle, final Locale locale) {
		return cache.getDateTimeInstance(dateStyle, timeStyle, null, locale);
	}
1008738
public Map<String, String> getAll(final Locale locale) {
        Map<String, String> ret = LANGS.get(locale);
        if (null == ret) {
            ret = new HashMap<>();
            final ResourceBundle defaultLangBundle = ResourceBundle.getBundle(Keys.LANGUAGE, Latkes.getLocale());
            final Enumeration<String> defaultLangKeys = defaultLangBundle.getKeys();
            while (defaultLangKeys.hasMoreElements()) {
                final String key = defaultLangKeys.nextElement();
                final String value = replaceVars(defaultLangBundle.getString(key));

                ret.put(key, value);
            }

            final ResourceBundle langBundle = ResourceBundle.getBundle(Keys.LANGUAGE, locale);
            final Enumeration<String> langKeys = langBundle.getKeys();
            while (langKeys.hasMoreElements()) {
                final String key = langKeys.nextElement();
                final String value = replaceVars(langBundle.getString(key));

                ret.put(key, value);
            }

            LANGS.put(locale, ret);
        }

        return ret;
    }
1221536
public static String format(final LocalTime self, FormatStyle timeStyle) {
        return self.format(DateTimeFormatter.ofLocalizedTime(timeStyle));
    }
502194
public static String formatCurrency(final Number value, final Locale locale)
    {
        return withinLocale(new Callable<String>()
        {
            public String call()
            {
                return formatCurrency(value);
            }
        }, locale);
    }
589207
public <N extends Number> CellFormatResult format(final String formatPattern, final N value, final Locale locale) {
        return format(new NumberCell<N>(value, formatPattern), locale);
    }
583248
private static DateFormatSymbols getCachedInstance(Locale locale) {
        SoftReference<DateFormatSymbols> ref = cachedInstances.get(locale);
        DateFormatSymbols dfs = null;
        if (ref == null || (dfs = ref.get()) == null) {
            dfs = new DateFormatSymbols(locale);
            ref = new SoftReference<DateFormatSymbols>(dfs);
            SoftReference<DateFormatSymbols> x = cachedInstances.putIfAbsent(locale, ref);
            if (x != null) {
                DateFormatSymbols y = x.get();
                if (y != null) {
                    dfs = y;
                } else {
                    // Replace the empty SoftReference with ref.
                    cachedInstances.put(locale, ref);
                }
            }
        }
        return dfs;
    }
1260825
private CellFormatter getCellFormatter(final Locale locale) {
        if(locale == null) {
            return defaultFormatter;

        } else if(formatterMap.containsKey(locale)) {
            return formatterMap.get(locale);
        }

        return defaultFormatter;
    }
1157608
public static FastDateFormat getDateInstance(final int style, final TimeZone timeZone, final Locale locale) {
		return cache.getDateInstance(style, timeZone, locale);
	}
891586
public String formatAsString(final String formatPattern, final String value, final Locale locale) {
        return format(formatPattern, value, locale).getText();
    }
182267
public String key(Locale locale) {

        if (getBundle() == null) {
            return getKey();
        }
        return getBundle().getBundle(locale).key(getKey(), getArgs());
    }