B2BKing is coded according to WordPress Internationalization standards and can be translated fully to any language. The plugin comes with a .pot file, a translation template that can be accessed and translated with a specialized plugin such as Loco Translate.
1. Download the free plugin called Loco Translate from here. Or add directly from the WordPress administration via Plugins > Add New.
2. Install and Activate.
3. Go to the new Loco Translate menu item created in your Dashboard with six sub-sections.
4. Go to the Plugins section, and select B2BKing:
5. Add new languages using the Add New Language link:
6. Choose the language to add in the list, or enter the language ISO code (ex: fr_FR, en_US etc…), and select the folder to add the translation files to, and click Start Translating:
Note that Loco Translate offers three different locations for your create the translating, the best choice is Other if you are looking to have your own custom translating, you should avoid “Author” location since it’s inside the plugin and will be overwritten on updates.
7. Click Save when finished:
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/
WPML is a complex plugin with lots of options, so for simple translations to a single language, we recommend Loco Translate instead. WPML is better for multi-language translation.
While we are not covering general translation with WPML, there is a specific aspect we would like to cover: 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 »"
Step 3) Find the B2BKing texts, check the boxes, scroll to the bottom of the screen, and click Apply
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_):
Step 4) You can now translate these as you would normally with WPML:
I go to the front page in English:
I switch to French:
To translate registration fields and registration roles (registration dropdown options), if you are translating the website to a single language:
For fields go to B2BKing->Registration Fields, click "Edit" on each field, and directly modify the Label and Placeholder:
For roles (individual customer, b2b users) go to B2BKing->Registration Roles, click "Edit" on each role, and directly modify the title:
To translate registration fields and registration roles with WPML, the most important thing is to keep the translated posts as disabled! This way, the text will be translated, without doubled fields/posts.
Powered by BetterDocs
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.