How do I set up widgets in multiple languages?

If you offer your website or webshop in multiple languages, you want a Boei widget in those languages as well - as customer-friendly as possible.

Boei supports this flexibly with conditions. You can create multiple widgets in Boei, and based on conditions, you can tell Boei which widget should be loaded.

This article will show you how this works for multiple languages.

Approach

Suppose you want to offer Boei in four languages and now have one widget.

SCR-20230423-jy0

The first step is to create four widgets, one for each language. You can duplicate the widget and then adjust it to speed up that work. That saves time because then you only have to translate the text and not also adjust the channels or settings.

SCR-20230423-k4n

You should now have created four widgets, one for each language. But how does Boei know which widget to load? We set that using conditions. In the example below, only the English widget is now shown, which is set to "Default". The default widget is loaded when no conditions are set or no conditions are valid.

SCR-20230423-juz

Let's start by creating conditions. The first step is simple, click on "new condition".

SCR-20230423-k5c

Give the condition a name so you can identify it later. The name is not shown to customers.

SCR-20230423-jve

When the condition has been created, click on "edit".

SCR-20230423-jvn

Now you can set the condition, and you do this as follows:

If rule: This rule will check the condition. For example, you have "Page URL contains," which means that the rule is valid when the URL your customer visits contain the word or characters.

Has value: You can set which word to search for here.

Then display this widget: Self-explanatory, but this allows you to set which widget should be displayed (or not).

We are now going to set this up for the Dutch widget. We set that if the page URL contains the value /nl/, Boei should load the Dutch widget.

Examples of pages that would match:

SCR-20230423-jw2

Now that the Dutch condition is set, you can repeat the previous steps for other languages until you have done all four.

SCR-20230423-jwj

That's it, and Boei will now display the translated widgets on your site.

Feedback Questions

Last updated: Apr 23, 2023