Skip Navigation
18

The Admin content-language switcher in WPML 2.3.0 allows creating different sidebars per language using Woo’s Sidebar Manager. See how it works.

The Sidebar Manager in Woo Framework is a great example for using the new Admin content-language switcher in WPML 2.3.0. It lists pages, categories and templates and lets users create special sidebars that display just for them.

Since translations are actually different pages, a sidebar that you create for a page in one language doesn’t show for its translations. This features gives the ability to create completely different sidebars per language.

You can use it to display different widgets altogether, or the same widgets but with different texts.

This video shows how I’m using it on our demo Canvas site:

I created this tutorial to show how to use the Admin content-language switcher. Many modern themes allow users to choose content for special site elements. These can be your portfolio page, items for a slider and other cool features. The Admin content-language switcher lets you choose the language of content in any Admin screen.

How can we make WPML better for you?

Share your thoughts and comments about our plugin, documentation, or videos by booking a Zoom call with Agnes, our Client Advocate. Your feedback matters and helps us improve.

Book a call with Agnes

18 Responses to “How to Build Different Sidebars per Language”

  1. I personally use Dynamic Widgets for pretty much the same reason; unlike Woo’s Sidebar Manager, which only works on Woo’s Framework, Dynamic Widgets will work with any theme.

    I favour Carrington’s framework for creating complex themes from scratch, since things like headers, footers, sidebars, single posts, and so forth can be independently configured for different categories/authors/tags… and languages. Still, it seems even easier to switch a few widgets around, depending on the language, and Dynamic Widgets is fully WPML-aware and deals with that flawlessly without the need of “hacking” themes.

      • Great Tip! Thanks. So in that aspect would it be safe to say that Dynamic Widgets is better/easier to use than Widget Logic in a multilingual environment?

      • I’m new to WPML. I cannot see how to make a widget appear on one language using the Dynamic Widgets. Can you guide me please?

        • Further to my above post, please feel free to let me know if there is a better method for sidebar translation. I’m not specifically asking about a plugin. All I want is to show different sidebar for each language.

          In fact I’m a bit taken back that such facility is not integral to WPML, then again I’m new I may well have missed something basic.

          All help is appreciated.

        • This blog post includes some screenshots using the Widget Logic plugin. Can you tell me at what stage it doesn’t look the same for you?

          Normally, people don’t use this technique. You can translate widget texts using WPML’s String Translation. This way, you display the same widgets in all languages, but with different content. It’s a lot easier to manage than different widgets per language.

          • I can’t see any screen shots specific to translation. I’ve installed the plugin but none of the conditions are relevant to translation. Anyhow, I am not insisting on using that or other plugin. I rather use whatever WPML offers as standard. I came here because support forum search pointed me to this post.

            Can you point me to a document where I can learn the “WPML’s String Translation” for widgets?

            FYI, I have also created an entry on the forum for the same subject. After noticing suggestions on this thread for it.

            Many thanks for your help.

  2. Hi, I didn’t know where to post this sugestion, so here it goes.
    Can you make wpml tap into body_class() function and the language name to the body ?
    I think it’s really easy to do and will help with styling the theme a little different based on language. A use case I have now, is I have a css background image that has some text written on it and I would like to switch this image with the translated version.

    Just a sugestion … I will probably do it myself for this project, but it could be useful.
    Apologies if this functionality already exists.

    • I’m not very keen on changing something that fundamental. It makes sense, but doing this now may change existing sites.

      You can add this hook in your theme’s functions.php file.

  3. Hi Amir,

    Got one thing still not working. I want the language selector appear in the top right corner of my page. Where do i have to add the php code in my template (purevision) to get the language selector working?

    it’s

    can you help me out?

    • Can you add this question on the forum where we’re handling the support issues?
      It’s easier to get feedback in there than here. Thanks.