Introduction

WPML lets you translate widget titles and the body of text widgets via the String Translation extension if the elements are coded specifically to work with WPML . We apply these coding techniques to widgets in themes which have received WPML certification, but older themes will lack this functionality. Sometimes, even coding techniques are not enough and you will need to have completely different widgets for each language because the widget uses an unusual or proprietary content display that cannot be turned into a string very easily. In these cases, or cases where you are not using WPML or don’t have the string translation extension, using a plugin to setup separate widget displays is the solution.

The Solution

Both Widget Logic and Dynamic Widgets are plugins that allows controlling where widgets display. You can use it to specify which post types, pages, categories or tags widgets are allowed, including which languages they will display in.

You can evaluate these plugins under Plugins > Add New by searching their names, or directly here:

Widget Logic

Dynamic Widgets
For example, you may be using a widget-driven home layout and need the HTML content of text widgets or widget descriptions to be translated, not just the titles and category selection which is inherently possible using the String Translation extension. Either of these plugins allow you to setup one copy of each plugin in each language, then specify the language to link them to.

For a detailed walkthrough on using Widget Logic, see:

http://wpml.org/2011/03/howto-display-different-widgets-per-language/

To use Dynamic Widgets, the same process applies. To select the language, you would click the “Static” link in the widget once it is setup, which will bring you to the Dynamic Widget settings page for that widget. Expand the Languages section and select the language to display the widget in, then save.

An alternative tool for translating websites and widgets is Weglot, find out more about Weglot here.

Elementor