Probably the easiest option is to just loop through the user messages and pass them through substitutions so you can just use substitutions in the language override. The below should work.
Global
Triggers: onAfterUserConfirmation
Type: Code
User: Automatic
Access: Everybody
Action
Method: PHP
Code:
Code:
if ( ! $variables['var5'] ) {
return;
}
foreach ( $variables['var5'] as $i => $msg ) {
$variables['var5'][$i] = $autoaction->string( $user, $msg );
}
Parameters
Reference Variables: Variable 5
Now all you should need to do is user language overrides and add your substitutions to the confirmation message strings.