Set language for SSO users

You can now set a user’s locale with SSO without a plugin. There are two parameters you can add to the SSO payload for this: locale and locale_force_update. The locale parameter needs to be set to a value that Discourse will accept. Here’s the list of locales that Discourse will accept:

ar, bg, bs_BA, ca, cs, da, de, el, en, es, et, fa_IR, fi, fr, gl, he, hu, id, it, ja, ko, lt, lv, nb_NO, nl, pl_PL, pt, pt_BR, ro, ru, sk, sl, sq, sr, sv, sw, te, th, tr_TR, uk, ur, vi, zh_CN, zh_TW

The locale_force_update parameter is used if you wish to update the locale of an existing user via SSO.

3 Likes