Upskilling on Azure AD B2C-Localisation

tutorial by Twin rizki from the Noun Project

I have organised the series as a list inside Medium so you can see the rest of the series.

Localisation allows you to support multiple locales or languages in the policy for the user journeys.

So you could get all the messages in e.g. Spanish.

But you can also change the messages in the same language i.e change e.g.

<LocalizedResources Id="api.localaccountsignup">

to:

<LocalizedResources Id="api.localaccountsignup.nz">

There’s an example here where I did a post about localising the PhoneFactor country drop down to make “NZ” the default country.

Exercise 7

The messages you can change are here.

In the sign-up screen, the message when the passwords don’t match is:

The customer wants the error to read:

“The passwords do not match. Be aware that the minimum password length is 12 characters”.

Search for the standard error message in the link above.

You will notice that the string is for a sign up i.e. a content definition with an ID of api.localaccountsignup.

So we need to make a new localisation for api.localaccountsignup.nz.

The actual element is:

ElementType="UxElement" StringId="error_passwordEntryMismatch">The password entry fields do not match. Please enter the same password in both fields and try again.

We end up with:

Note: If you get a message like:

Validation failed: 1 validation error(s) found in policy “B2C_1A_MEDIUMB2C_EXERCISEEXTENSIONS” of tenant “tenant.onmicrosoft.com”.The localized string with ElementType: UxElement and StringId: error_passwordEntryMismatch has an invalid StringId

it means you are using the wrong api.xxx file e.g. api.signuporsignin instead of api.localaccountsignup.

The easiest way to sort out the right file is to follow the instructions here and download the strings as per the section on“Customize your strings”. Then search for the string in the downloaded file.

If you are stuck, look here.

All good!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store