Meta Box Lite
Meta Box

Improvements in Polylang and WPML Integrations

Creating multilingual WordPress websites, while it has a lot of dynamic content, has always been a challenge since it often requires complex setups and manual configurations.

Well, not anymore.

Meta Box now integrates seamlessly with the two most popular WordPress multilingual plugins: Polylang and WPML. We’ve simplified the process like never before, allowing you to translate labels, values, and any strings created with Meta Box in just a few clicks.

Meta Box’s compatibility with WPML and Polylang has reached a whole new level. Let’s dive into these integrations and see how easy it is!

User Challenges

With the growth of global trade, making your website multilingual is a necessary step for expanding your target markets. Polylang and WPML are the two most commonly multilingual plugins used by Meta Box users.

We have received numerous requests for feature upgrades due to users facing difficulties in translating content, particularly labels of objects such as post types, taxonomies, field groups, settings pages, and relationships. The challenges arose from a lack of documentation and the need for complex coding techniques.

We worked closely with the WPML and Polylang teams to find a solution that allows Meta Box users to translate everything easily, even those who aren’t familiar with coding.

From now on, you will have a visual interface to choose and enter the translation for items you want. No code, no complex configuration, and no additional plugins.

Meta Box - Polylang Integration

This integration provides the UI for translating everything without any code. Your work is simply choose the object you want, and enter the translation. It’s easier, quicker, more convenient, and more effective. This integration works smoothly whether you're using Polylang or Polylang Pro.

Intuitive Interface for Translating Field Values

Previously, you had to create a wmpl-config.xml file to define the field ID and action for translating. We understand that it’s inconvenient and difficult, especially with beginners and non-developers. From now on, you can translate field values and manage translations directly with a user-friendly interface or simple code. It is useful and suitable for everyone.

In the Settings tab of the field group, we added a new setting named Translation where you can choose how do you want to translate the field group. It offers 4 options:

  • Do not translate any fields in this field group
  • Translate all fields in this field group
  • Synchronize values across languages
  • Set translation mode per field

The translation setting offers options to translate the field group

Especially, when you choose the last option, a pop-up that contains all the fields and groups in your field group appears with 3 translation modes (similar to the field group): ignore, translate, and synchronize. For more details about each mode, you can refer to our documentation. In the real cases, we recommend you use the Translate mode since the field value is copied to the new translation, and can be edited as you want.

Choose the translation mode for each field

You can also view or edit these setting.

If you’re familiar with code, you can use the translation property with its values as ignore, translate, synchronize, or advanced. They correspond to the options in the MB Builder.

Translate field values using code

In this first version of integration, for object-based fields (e.g., image, file, post, term, user), when the translation mode is set to translate, the Meta Box – Polylang integration will copy the ID of the original object instead of linking to its translated version. But if you have any suggestions about it, feel free to share your thoughts with us. We’re appreciated.

Convenient Filter for Translating Labels

Not only field values, but also field labels and other labels can be translated visually through the intuitive interface. Your work is just filtering strings by the object you want, then input the translation. It can be labels of a post type, taxonomy, field group, relationship, or settings page.

To translate any labels on your site, go to Languages > Translation. Meta Box offers filter functionality. Then, choose the object you want to translate its labels.

Meta Box provides filters based on objects to translate labels easily

For example, I need to translate these labels in the field group named Event Information:

The field labels need to translate

In the Translations submenu, filter strings by Meta Box Field Group: Event Information. Then, you can enter translations for all the labels you have.

Filter by Meta Box Field group to translate field labels

To display them on the frontend, you can use MB Views or a page builder.

On this screen, you can translate labels of post types, taxonomies, fields, settings pages, and settings page values.

However, for field values in the settings page, we recommend you translate directly as below.

Translate values of settings page fields

The Meta Box - Polylang integration works well for cloneable groups.

For more details, please read our documentation.

Meta Box - WPML Integration

Different from integration with Polylang, WPML provides a UI for translating the field values. So, in this integration, we enhanced the way to translate object labels and simplified the settings page translation without any code. With it, WPML is now fully compatible with Meta Box, allowing you to translate anything.

Label Translation

Previously, translating labels was a daunting task. You need to add code to define a label as a string first. It was time-consuming and prone to technical errors.

Now, Meta Box - WPML integration detects the labels as strings automatically. Your work is just to choose the labels you want and input the translation for them. It works in a similar way to how Polylang does.

You can translate labels of any objects, including custom post types, taxonomies, field groups, fields, settings pages, and relationships. They’re especially put into the separate tab for more convenience.

After setting up the site language, you can translate labels immediately. Go to WPML > Translation Management. Besides the default tabs provided by WPML, you can see some tabs as below:

New tabs help translate labels of objects

They include labels that can translate in those objects. Let me translate the post type labels as an example so you can have a clearer overview.

Right after publishing a field group, you can see it in the Meta Box: Post Type tab.

Go to Translation management submenu to translate custom posts

Then, the translation process is the same as post translation. Just choose the translation method and enter content for languages.

Enter translations for the labels

With this feature, you don’t need to search for them one by one in the Strings table. As a result, you can avoid missing any labels.

After completing translations, they work well when you switch languages.

The post type labels are translated

Settings Page Field Values Translation

Many users have trouble translating the values of the settings page field since the configuration and translation settings page is quite involved. However, it’s a piece of cake now. It’s even easier than any label translation you’ve ever worked on.

Simply switch the language of the site, then edit the translation since we copied the value in the default value. Its purpose is that you don’t have to enter again in some cases that you want to keep them intact (for example: email, phone number, etc.).

Translate settings page field values easily

You should refer to our docs to understand how to translate any items you need in detail.

Last Words

We hope that with these integrations, making your website multilingual will become as easy as pie. Is this the thing you've been waiting for all this time? Go ahead and experience it now. Don’t forget to let us know your feedback!

If you want to try another method to translate your WordPress, you can take a look at the comparison between Multisite vs Polylang.

Leave a Reply

Your email address will not be published. Required fields are marked *