in order to set the language of freshchat during initialization, it is enough to specify
<script> window.fcWidgetMessengerConfig = { locale: "fr" } </script>
The documentation (https://developers.freshchat.com/web-sdk/v2/#multi-lang) says that in order to change the language dynamically, you should call
window.fcWidget.user.setLocale('en')
But when I do this, nothing happens. In the browser console, you can see that the function is called, but the chat does not change the language.
How to change the language correctly?