Gets the message for the current locale and the given key and arguments.<p>

@param messages the messages instance
@param key the message key
@param args the message arguments

@return the message text for the current locale
506728
public static String getMessageText(I_CmsMessageBundle messages, String key, Object... args) {

        return messages.getBundle(A_CmsUI.get().getLocale()).key(key, args);
    }
740250
protected String getMessageInternal(Locale locale, String code, Object[] args) {
		if(code == null) {
			return null;
		}

		if(locale == null) {
			locale = I18nUtils.getLocale();
		}

		final MessageFormat messageFormat = resolveMessageFormat(locale, code);
		if(messageFormat != null) {
			synchronized(messageFormat) {
				return messageFormat.format(args);
			}
		}

		return null;
	}
349686
public String getMessage(String message, Object[] args)
    {
        for (int i=0;i<args.length;i++)
        {
            if (args[i] instanceof List<?>)
            {
                @SuppressWarnings("unchecked")
				List<ProxyField> list = (List<ProxyField>)args[i];
                StringBuilder sb = new StringBuilder();
                for (ProxyField pf: list)
                {
                    sb.append(String.valueOf(pf.getValue()));
                    sb.append(",");
                }
                if (sb.length()>0)
                {
                    args[i] = sb.substring(0, sb.length()-1);
                }
                else
                {
                    args[i] = "";
                }
            }
        }
        return m_messageSourceAccessor.getMessage(message, args);
    }
158811
public String getMessage(final Locale locale, final String key) {
        return loadResource(locale).getMessage(key);
    }
112072
public static Message warn(Entity entity, String key, String... args) {
        return message(MessageType.WARN, entity, key, args);
    }
536224
@Override
    public void hardmsg(String key, Object... args) {
        hard(messageFormat(key, args));
    }
1215397
public static String getMessage(String code, Object... args) {
		return getMessage(I18nUtils.getLocale(), code, args);
	}
51959
protected String message(String key, Object... args) {

        return Messages.get().key(key, args);
    }
1219695
public String getInvalidMessage(String key) {
        return invalidMessageOverride == null ? messageMixin.lookup(key, messageValueArgs) : MessageFormat.format(
                invalidMessageOverride, messageValueArgs);
    }
236234
function message(key, args) {
  if (typeof key !== 'string') throw new Error('Error message key must be a string');
  const msg = messages.get(key);
  if (!msg) throw new Error(`An invalid error message key was used: ${key}.`);
  if (typeof msg === 'function') return msg(...args);
  if (args === undefined || args.length === 0) return msg;
  args.unshift(msg);
  return String(...args);
}
353636
public static String getString(String aKey, Object[] args)
    {
        assert (aKey != null);

        String pattern = getBundle().getString(aKey);
        if (args == null)
            return pattern;

        MessageFormat format = new MessageFormat(pattern);
        return format.format(args).toString();
    }
714072
public String getMessage(final MSLocale formatLocale, Locale runtimeLocale, final String key) {

        if(formatLocale != null) {
            return getMessage(formatLocale, key);
        } else {
            return getMessage(runtimeLocale, key);
        }

    }
321762
public Collection<ValidationMessage<Origin>> getMessages(String messageKey) {

		Collection<ValidationMessage<Origin>> result = new ArrayList<ValidationMessage<Origin>>();

		for (ValidationMessage<Origin> message : messages) {
			if (messageKey.equals(message.getMessageKey())) {
				result.add(message);
			}
		}
		return result;
	}
343409
protected final void addMessage(String msgKey, Object... args) {
    getFlash().addMessageNow(getTextInternal(msgKey, args));
  }
466449
public String getMessage(String key, Object arg)
        throws MissingResourceException {
        return getMessage(key, new Object[] {arg});
    }
1323915
static String getMessage(CmsObject cms, String message, Object... args) {

        Locale locale = OpenCms.getWorkplaceManager().getWorkplaceLocale(cms);
        return Messages.get().getBundle(locale).key(message, args);
    }
698882
public function __lang($key, ...$args)
    {
        $string = array_key_exists($key, $this->messages_dictionary) ? $this->messages_dictionary[$key] : $key;
        return (func_num_args() > 1) ? vsprintf($string, $args) : $string;
    }