Like {@link #formatMessage(TraceComponent, List, String, Object...)},
but takes an Enumeration of Locales.

@see #formatMessage(TraceComponent, List, String, Object...)
548961
public static String formatMessage(TraceComponent tc, Enumeration<Locale> locales, String msgKey, Object... objs) {
        return formatMessage(tc, (locales == null) ? null : Collections.list(locales), msgKey, objs);
    }
287907
public String importMessage(String key, Locale locale) {

        key = key.trim();
        String[] tokens = key.split("#");
        if (tokens.length != 2) {
            return null;
        }
        String className = tokens[0];
        String messageName = tokens[1];
        try {
            Method messagesGet = Class.forName(className).getMethod("get");
            I_CmsMessageBundle bundle = (I_CmsMessageBundle)(messagesGet.invoke(null));
            return bundle.getBundle(locale).key(messageName);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
            return null;
        }
    }
1163771
@Override
    public String getFormattedMessage() {
        if (formattedMessage != null) {
            return formattedMessage;
        }
        final StringBuilder sb = new StringBuilder(255);
        formatTo(sb);
        return sb.toString();
    }
824247
@Transformer(requireTemplate = true)
    public static String format(Number number, String pattern, Locale locale) {
        return format(null, number, pattern, locale);
    }
1137
public static PrettyTimeFormat prettyTimeFormat(final Locale locale)
    {
        return withinLocale(new Callable<PrettyTimeFormat>()
        {
            public PrettyTimeFormat call() throws Exception
            {
                return context.get().getPrettyTimeFormat();
            }
        }, locale);
    }
6428
public static String i18n(ResourceBundle messages, String key, Object... messageArguments) {
    MessageFormat formatter = new MessageFormat("");
    formatter.applyPattern(messages.getString(key).replaceAll("'", "''"));
    return formatter.format(messageArguments);
  }
1224633
@RequestMapping(value = PhoneNumber.PARSE_AND_FORMAT, method = RequestMethod.GET)
  @PermitAll
  public PhoneNumberDataWithFormats parseAndFormatPhoneNumber(
      @RequestParam(value = Parameters.LANGUAGE, required = true) final String planguage,
      @RequestParam(value = Parameters.COUNTRY, required = true) final String pcountry,
      @RequestParam(value = Parameters.PHONE_NUMBER, required = true) final String pphoneNumber) {
    final PhoneNumberDataWithFormats result = new PhoneNumberDataWithFormats(phoneNumberUtil
        .parsePhoneNumber(pphoneNumber, pcountry, LocaleUtil.convertLanguageToLocale(planguage)));
    result.setCommonInternational(phoneNumberUtil.formatCommonInternational(result));
    result.setCommonNational(phoneNumberUtil.formatCommonNational(result));
    result.setDin5008International(phoneNumberUtil.formatDin5008International(result));
    result.setDin5008National(phoneNumberUtil.formatDin5008National(result));
    result.setE123International(phoneNumberUtil.formatE123International(result));
    result.setE123National(phoneNumberUtil.formatE123National(result));
    result.setMs(phoneNumberUtil.formatMs(result));
    result.setUrl(phoneNumberUtil.formatUrl(result));
    return result;
  }
976135
public @Nonnull StaticMessageSource addMessage(@Nonnull Locale locale, @Nonnull String code, @Nonnull String message) {
        ArgumentUtils.requireNonNull("locale", locale);
        if (StringUtils.isNotEmpty(code) && StringUtils.isNotEmpty(message)) {
            messageMap.put(new MessageKey(locale, code), message);
        }
        return this;
    }
704053
public <Message extends PMessage<Message, Field>, Field extends PField>
    String format(Message message) {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        formatTo(out, message);
        return new String(out.toByteArray(), StandardCharsets.UTF_8);
    }
593211
@Override
  public DurationFormatterFactory setLocale(String localeName) {
    if (!localeName.equals(this.localeName)) {
      this.localeName = localeName;
      if (builder != null) {
          builder = builder.withLocale(localeName);
      }
      if (formatter != null) {
          formatter = formatter.withLocale(localeName);
      }
      reset();
    }
    return this;
  }
529171
@Override
    public List<String> toMessageList(Locale locale, UserMessages messages) {
        assertArgumentNotNull("locale", locale);
        assertArgumentNotNull("errors", messages);
        if (messages.isEmpty()) {
            return Collections.emptyList();
        }
        final List<String> messageList = new ArrayList<String>();
        final Iterator<UserMessage> ite = messages.accessByFlatIterator();
        while (ite.hasNext()) {
            messageList.add(resolveMessageText(locale, ite.next()));
        }
        return Collections.unmodifiableList(messageList);
    }
125896
def format(self, fmt, locale=None):
        
        return self._formatter.format(self, fmt, locale)
506688
private String format( Object[] arguments )
    {
        Locale l = Locale.getDefault();
        if ( locale != null )
        {
            String[] parts = locale.split( "_", 3 );
            if ( parts.length <= 1 )
            {
                l = new Locale( locale );
            }
            else if ( parts.length == 2 )
            {
                l = new Locale( parts[0], parts[1] );
            }
            else
            {
                l = new Locale( parts[0], parts[1], parts[2] );
            }
        }

        return new MessageFormat( format, l ).format( arguments );
    }
929748
public CellFormatResult format(final ObjectCell<?> cell, final Locale locale) {
        
        if(cell == null) {
            final CellFormatResult result = new CellFormatResult();
            result.setCellType(FormatCellType.Blank);
            result.setText("");
            return result;
        }
        
        final Locale runtimeLocale = locale != null ? locale : Locale.getDefault();
        
        final short formatIndex = cell.getFormatIndex();
        final String formatPattern = cell.getFormatPattern();
        
        if(formatterResolver.canResolve(formatIndex)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatIndex);
            return cellFormatter.format(cell, runtimeLocale);
            
        } else if(formatterResolver.canResolve(formatPattern)) {
            final CellFormatter cellFormatter = formatterResolver.getFormatter(formatPattern);
            return cellFormatter.format(cell, runtimeLocale);
            
        } else {
            // キャッシュに存在しない場合
            final CellFormatter cellFormatter = formatterResolver.createFormatter(formatPattern) ;
            if(isCache()) {
                formatterResolver.registerFormatter(formatPattern, cellFormatter);
            }
            return cellFormatter.format(cell, runtimeLocale);
            
        }
    }
554612
function createLocales (json, params, callback) {
  var locales = registerLocales(json.shift());
  var indexes = locales.indexes;
  var messageName;

  delete locales.indexes;

  json.forEach(function (messageLine) {
    var messageProp, lineValue, propPath;

    for (var i = 0, len = messageLine.length; i < len; i++) {
      lineValue = messageLine[i];
      if (i === 0) {
        // The first item is a message name
        // or an empty string for a "description"
        messageName = lineValue || messageName;

      } else if (i === 1) {
        // The second is "message" or "description"
        messageProp = lineValue;

      } else {
        // All others are locales
        if (lineValue === '' && messageProp !== 'description') {
          continue;
        }
        propPath = [
          indexes[i], 'messages', messageName
        ].join('.');
        getByPath(locales, propPath, true)[messageProp] =
          messageProp !== 'placeholders' ?
            lineValue || ''
            : parsePlaceholders(lineValue);
      }
    }
  });
  if (params.debug) {
    log('Generated locales:', locales);
  }
  writeLocales(locales, params, callback);
}
1211299
@SuppressWarnings("unchecked")
	public <T extends Message> Map<String, Object> writeMessage(final T message,
			final MessageDescriptor<T> descriptor) {
		try {
			return (Map<String, Object>) objectFormat.write(message, descriptor);
		} catch (Exception e) {
			throw propagate(e);
		}
	}
230040
@ObjectiveCName("formatMessagesExport:")
    public String formatMessagesExport(Message[] messages) {
        String text = "";
        Arrays.sort(messages, new Comparator<Message>() {

            int compare(long lhs, long rhs) {
                return lhs < rhs ? -1 : (lhs == rhs ? 0 : 1);
            }

            @Override
            public int compare(Message lhs, Message rhs) {
                return compare(lhs.getEngineSort(), rhs.getEngineSort());
            }
        });

        if (messages.length == 1) {
            for (Message model : messages) {
                if (!(model.getContent() instanceof TextContent)) {
                    continue;
                }
                text += ((TextContent) model.getContent()).getText();
            }
        } else {
            for (Message model : messages) {
                if (!(model.getContent() instanceof TextContent)) {
                    continue;
                }
                if (text.length() > 0) {
                    text += "\n";
                }
                text += getUser(model.getSenderId()).getName() + ": ";
                text += ((TextContent) model.getContent()).getText();
            }
        }
        return text;
    }