Azure B2C Custom Policies - Language customization - Policy default language doesn't work

Gabriela M 26 Reputation points
2022-10-20T16:21:52.86+00:00

Although in TrustFrameworkLocalization.xml I have set:
<Localization Enabled="true">
<SupportedLanguages DefaultLanguage="ro" MergeBehavior="ReplaceAll">
<SupportedLanguage>ro</SupportedLanguage>
<SupportedLanguage>en</SupportedLanguage>
</SupportedLanguages>
the language is always English.

The only way it work is by setting ui_locales.

I use this documentation: https://learn.microsoft.com/en-us/azure/active-directory-b2c/language-customization?pivots=b2c-custom-policy#support-uilocales-requested-languages

Am I missing something?
Thanks for any help.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,775 questions
{count} votes

Accepted answer
  1. James Hamil 23,216 Reputation points Microsoft Employee
    2022-10-24T22:51:38.547+00:00

    Hi @Gabriela M , the only way for it to work properly is by using ui_locales. From the document you linked:

    "You might not need that level of control over what languages your customer sees. If you don't provide a ui_locales parameter, the customer's experience is dictated by their browser's settings.

    • ui-locales specified language: After you enable language customization, your user flow is translated to the language that's specified here.
    • Browser-requested language: If no ui_locales parameter was specified, your user flow is translated to the browser-requested language, if the language is supported.
    • Policy default language: If the browser doesn't specify a language, or it specifies one that is not supported, the user flow is translated to the user flow default language."

    So if you're testing with your browser and it's still English it's most likely your browser settings. If not it's going to be one of the 3 bullet points above. Please review your settings and see if this changes anything. If not you probably just need to use ui_locales.

    Please let me know if you have any questions!

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,
    James


0 additional answers

Sort by: Most helpful