Multi-language Widgets in WordPress with WPML

WordPress

WordPress

I have recently launched a Unix Tutorial RU, Russian language version of my Unix Tutorial blog. After careful consideration, I have decided to use WPML plugin for managing translated copies of pages and posts.

How Multi-Site Works with WPML

From what I can see, WPML is a redicretion and page query parameters based magic. It allows you to host multi-language sites from a single hosting setup, so essentially it’s just one WordPress installation with WPML plugin helping it manage multiple translated copies of the same pages and posts.

In my setup, I chose to use a separate domain: www.UnixTutorial.RU with Russian translations of www.UnixTutorial.org pages.

Multi-Language Support in WordPress Widgets

Turns out, it’s very simple to manage multi-language sidebar content.

Step 1: Add another instance of same widget to sidebar

Create a copy of your existing sidebar widget, by selecting the same widget type and adding it to the same sidebar. I ended up with having two widgets like this:

Screen Shot 2019-10-05 at 10.55.52.png

Step 2: Populate new widget with translation

Edit to make sure the newly copied widget contains the desired translation:

Screen Shot 2019-10-05 at 10.56.00.pngStep 3: Select when to show new widget (pick a language)

Select a new language for the template:

Screen Shot 2019-10-05 at 10.56.07.png

This means that new sidebar widget will only be shown on the translated version of my website.

That’s it, enjoy!

See Also

 

 

Speak Your Mind

*