3

I've been using these blogposts to translate the error-messages that Sitecore Forms uses into Dutch and German for our client. But I can't seem to find any Sitecore item or dictionary-entry to translate the error messages that come with the "E-mail confirmation" and "Password confirmation" form field-types.

The only thing I can see (using JustDecompile) is that the message that currently pops up seems to be the hard-coded ErrorMessage param of the LocalizedCompare attribute in Sitecore.ExperienceForms.Mvc.Models.Fields.PasswordConfirmationViewModel and EmailConfirmationViewModel:

[LocalizedCompare("Value", TitleProperty="ConfirmPasswordLabel", OtherTitleProperty="Title", ErrorMessage="The {0} and {1} do not match.")]
public string ConfirmPassword
{
    get;
    set;
}

How would I go about translating those? We're on Sitecore 9.3

1

You need to create a dictionary item with the key: The {0} and {1} do not match.

enter image description here

You will see then the error message on the page :

enter image description here

I test in on 9.3 version.

1
  • Thanks! Too bad I can't have a different message for e-mail and password since Dictionary keys have to be unique.
    – asontu
    Feb 11 '20 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.