Overview of the Issue
When you use the Joinchat Button block of Joinchat 6.x on a translated page, the button text is translated, but the chat opens with the message in the original language.
The block keeps its message in a block setting that WPML does not send for translation.
Workaround
Tell WPML how to translate the Joinchat settings:
- Go to WPMLSettings and open the Custom XML Configuration tab.
- Add this code and save:
<wpml-config> <custom-fields> <custom-field action="translate">_joinchat</custom-field> </custom-fields> <custom-fields-texts> <key name="_joinchat"> <key name="message_text" /> <key name="message_send" /> </key> </custom-fields-texts> <gutenberg-blocks> <gutenberg-block type="joinchat/button" translate="1"> <key name="message" /> </gutenberg-block> </gutenberg-blocks> </wpml-config> - Update the translation of each page that has a Joinchat Button block, and translate the button’s message.
This file covers both Joinchat issues. In the translation editor, you also see the page’s phone number and the “view” setting. Keep them, or change them for the language.