0

B2C Multilingual issue, Am setting the language to "gu" i.e. Gujarati, the content is converted to "gu" but the success/failure message are displayed in english language. I want it to be in "gu".

enter image description here

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108

1 Answers1

0

According to > User flows and custom policies in Azure Active Directory B2C

User flows are predefined, built-in, configurable policies that we provide so you can create sign-up, sign-in, and policy editing experiences in minutes.

Custom policies enable you to create your own user journeys for complex identity experience scenarios

enter image description here

The Localization element allows you to support multiple locales or languages in the policy for the user journeys. The localization support in policies allows you to:

• Set up the explicit list of the supported languages in a policy and pick a default language.

• Provide language-specific strings and collections.

enter image description here

Use a verification display control to verify a claim, for example an email address or phone number, with a verification code sent to the user.(Reference)

enter image description here

See code Localization string IDs - Azure Active Directory B2C and default values and customize the language in custom policy for the preferred language.

<LocalizedResources Id="api.localaccountsignup.gu">
   <LocalizedStrings>
       <LocalizedString ElementType="DisplayControl" ElementId="emailVerificationControl" StringId="success_send_code_msg">Customize the error message in gujarati</LocalizedString>

//for error messages you can use element type as ErrorMessage
    <LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfClaimsPrincipalDoesNotExist">Your customized error message in language enabled</LocalizedString>

   <!-- Display control UI elements-->
    <LocalizedString ElementType="DisplayControl" ElementId="emailVerificationControl" StringId="intro_msg"> Customize the error message in gujarati </LocalizedString>

  </LocalizedStrings>
</LocalizedResources>

Please do check this Azure b2c Custom Policies Error Message - Microsoft Q&A and similar issue here which may give an idea.

Pass the query parameter ui_locales=en as part of your authentication request. Replace it with preferred language as a part of your end point.

Other reference: customising-the-message-error-text-in-azure-ad-b2c-custom-policies

kavyaS
  • 8,026
  • 1
  • 7
  • 19