translate() 정적인 공개 메소드

Substitution works by replacing tokens like "{$foo}" with the value of the parameter named "foo" (if supplied).
static public translate ( $key, $params = [], $locale = null ) : string
$key string
$params array named substitution parameters
$locale string the locale to use
리턴 string
/**
 * Wrapper around PKPLocale::translate().
 *
 * Enables us to work with translated strings everywhere without
 * introducing a lot of duplicate code and without getting
 * blisters on our fingers.
 *
 * This is similar to WordPress' solution for translation, see
 * <http://codex.wordpress.org/Translating_WordPress>.
 *
 * @see PKPLocale::translate()
 *
 * @param $key string
 * @param $params array named substitution parameters
 * @param $locale string the locale to use
 * @return string
 */
function __($key, $params = array(), $locale = null)
{
    return PKPLocale::translate($key, $params, $locale);
}