简体   繁体   中英

Azure AD B2C Custom policy language translation

I have declared a set of supported langauges in my custom policy. But what happens is, Microsoft implicitly convert some text and messages to other languages eventhough when i haven't decalred that langugae to be supportred.

(Eg) I haven't supported croatian language in my app, so when i pass croatian langauge in my query param, it should point to default language referred in the custom policy, Because croatian is in my unsupported langugaes list. what in reality some of the messages gets converted to croatian and shown in UI.

It is true. And Custom Policies out of the box supported language customization but support is limited to few fields/inputs/labels/messages. If your application support multi language then you can add your own customization.

(Eg) I haven't supported croatian language in my app, so when i pass croatian langauge in my query param, it should point to default language referred in the custom policy, Because croatian is in my unsupported langugaes list. what in reality some of the messages gets converted to croatian and shown in UI.

Update: Currently this is not possible and you need to limit supported languages from your application it self.

Typical Multi Language Scenario for a web/ native application (may be a workaround):

  1. Web application show up the list of supported languages either in drop down or any user friendly way
  2. Application will capture the locale from the customer selected language and append to the request URL.
  3. If that locale is valid at B2C side it will start displaying Ux in that language

There is only 1% changes where customers can actually edit the Authorize URL to modify the locale. Your concern is still valid but based on above scenario itwill become less impact on your application.

If you would like to force the locale you can use the query string when requesting the B2C application.

?ui_locales={en}

Where you would replace {en} with the locale you support for more info see the offical docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM