Localization Based on User Login details

If you enable the settings set locale from accept language header and allow user locale you might not need to do this? It would detect the locale from the browser’s settings.

Are you using SSO for your forum logins? You’d be able to use the API to configure the language that way.