Translate B2BKing with WPML

WPML is a powerful translation plugin, ideal for translating your site to multiple languages, and allowing customers to switch between languages (with a language switcher dropdown for example).

Here's what you need to know to use B2BKing with WPML:

General Translation Info #

There are many guides out there for translation with WPML, and we recommend starting with the official guide: https://wpml.org/documentation/getting-started-guide/

For general translation of plugin texts, you can usually use WPML's String Translation: https://wpml.org/documentation/getting-started-guide/string-translation/

WPML also has a Multilingual module that allows WooCommerce product translation: https://wpml.org/documentation/related-projects/woocommerce-multilingual/

Translate Admin Texts with WPML #

An important aspect of translating B2BKing with WPML is translating admin texts such as "Login to view prices" or "Please login to access the B2B portal".

Since these texts are not normal strings but "admin texts" in WPML, they require a special approach. How to do it:

Step 1) Go to WPML->String Translation

Step 2) Scroll to the bottom of the screen and click on "Translate texts in admin screens »"

8392200935.png

Step 3) Find the B2BKing texts, check the boxes, scroll to the bottom of the screen, and click Apply

6758700739.png

You should see a message "The selected strings can now be translated using the string translation screen"

Now you can see the strings like this in WPML->String Translation (they show with the prefix admin_texts_):

5524951102.png

Step 4) You can now translate these as you would normally with WPML:

8398044907.png

That's it!

If we check the front page in English we will see the following:

If we switch to French, we will then see it as follows:

Translate Registration Fields and Roles with WPML / Multi Language #

  • 1. First of all, in order to be able to translate these, you must go to WPML -> Settings -> and scroll down to "Post Types Translation". Here you must set the 2 custom post types: b2bking_custom_role and b2bking_custom_field as "Translatable".
  • 2. Now, when you go to B2BKing -> Registration Roles / Fields, you will be able to add versions in other languages:
  • 3. Click on the Plus sign, add a translation for your other languages, and edit the translated post, so that for example the Field Label, or the Placeholder Text are translated to your desired languages.
  • 4. Finally, a very important step is to keep the translated posts as disabled! This makes sure the text is indeed translated, but that the multiple language versions do not show multiple times.

Powered by BetterDocs