Home > Net >  Remove % on symfony translated text
Remove % on symfony translated text

Time:12-30

I'm translating some texts on symfony this way

expired.password.body: 'Dear %name% %surname%,<br><br>Your password has expired.'

and this is the translation code

$email_params = [
                'name' => $user_to_change_password->getName(),
                'surname' => $user_to_change_password->getSurname()
            ];

$body = $this->translator->trans('expired.password.body', $email_params, 'emails');

then the text is translated and the parameters are correct but the % are still in the trandlated text

Dear %foo_name%            
  • Related