Here you can find the source of getMessage(final Locale locale, final String messageKey)
public static String getMessage(final Locale locale, final String messageKey)
//package com.java2s; //License from project: Open Source License import java.text.MessageFormat; import java.util.Locale; import java.util.ResourceBundle; public class Main { public static String getMessage(final Locale locale, final String messageKey) { final ResourceBundle rb = ResourceBundle.getBundle("messages", locale); return rb.getString(messageKey); }// w w w . j av a 2s. c om public static String getMessage(final Locale locale, final String messageKey, final Object[] params) { final ResourceBundle rb = ResourceBundle.getBundle("messages", locale); return MessageFormat.format(rb.getString(messageKey), params); } }