public static function formatError($message, $errorValues)
    {
        foreach ($errorValues as $token => $value) {
            $message = preg_replace("/\%$token\%/", $value, $message);
        }
        return $message;
    }
public static function formatError($message, $errorValues)
    {
        foreach ($errorValues as $token => $value) {
            $message = preg_replace("/\%$token\%/", $value, $message);
        }
        return $message;
    }
public static function formatError ( $ message , $ errorValues ) { foreach ( $ errorValues as $ token => $ value ) { $ message = preg_replace ( "/\%$token\%/" , $ value , $ message ) ; } return $ message ; }
Replaces placeholder tokens in an error message with actual values.

This method enables you to internationalize the messages for the
File_MARC class by simply replacing the File_MARC_Exception::$messages
array with translated values for the messages.

@param string $message     Error message containing placeholders
@param array  $errorValues Actual values to substitute for placeholders

@return string             Formatted message
Replaces placeholder tokens in an error message with actual values .