WPML
How to integrate WhatsApp widget and button with WPML
Translating WhatsApp widget strings
WhatsApp widget strings includes widget label and greetings shown on the floating widget.
In order to translate these strings, follow these steps:
1 - Navigate to WPML > String Translation.
2 - Select Display All strings
and In domain admin_texts_nta_wa_widget_styles
. This will list all the WhatsApp widget's English strings in use and the available languages that you have set up using WPML.
3 - Click the language edit button to open the context pop-up.
4 - Add your translation to each respective original string.
Translating WhatsApp operators
Operators are your company members or support agents that you choose to show on the floating widget or WooCommerce button.
Many online business prefers to use a local operator with a different WhatsApp phone number for the local customers. Therefore, translating WhatsApp operators is to add and localize new members, so to speak.
Here are the basic steps to add and localize a new member:
1 - Visit All Accounts: In this list, you will see the list of available operators for each language.
For instance, in the screenshot below, I have 2 English operators, 2 Germans, and 1 Japanese.
2 - Select a foreign language from the WordPress admin top bar.
Eg: Select Deutsch if you want to add German operators.
3 - Add new account: This will add a new operator to the selected destination language. Learn more on adding a new operator.
4 - When you've successfully added new operators, you will see them once you click on the language filter.
Localizing a WhatsApp operator
Assuming you're selecting Deutsch from the WordPress admin top bar, you will see Sprache as Deutsch. And in the "Add new account" screen, you can add the German translations to this operator.
This German operator's information will be used in the WhatsApp chat widget that shows in German locale.
Likewise, you can continue adding Japanese operators by selecting 日本語 from the admin top bar.
Translating WhatsApp widget
Step 1: Translate WhatsApp widget strings
Step 2: Add translated WhatsApp operators
Select a language from the admin top bar, eg. Deutsch
Navigate to WhatsApp > Floating Widget
Under Selected Accounts, please pick the operator you want to show from the list of translated operators available in that language.
Eg. I have created 2 members for German locale from the previous step, so I have 2 accounts available here.
Step 3: Display WhatsApp content in multiple languages
Once you finish adding corresponding operators to each local language in WhatsApp plugin settings, now you can set up display options in WPML Settings.
Look for "WhatsApp Accounts" and you will see its display options.
Case 1: If you want to show just the German operators in German language, select only show translated items.
With this setting, only the two German operators will display in accordance with German locale.
Case 2: If you want to show German operators if available, and also show English operators as a fallback, please select use translation if available or fallback to default language.
With this setting, the English operators and the other two Germans will display in accordance with German locale.
Case 3: If you want to show all operators regardless of the locale, you can select Not translatable. But this is not recommended.
Translating WhatsApp WooCommerce button
Last updated