{"id":812533,"date":"2016-02-17T11:34:50","date_gmt":"2016-02-17T11:34:50","guid":{"rendered":"https:\/\/wpml.org\/?p=812533"},"modified":"2016-08-26T14:15:15","modified_gmt":"2016-08-26T14:15:15","slug":"content-aware-sidebars-wpml","status":"publish","type":"post","link":"https:\/\/wpml.org\/pt-br\/compatibility\/2016\/02\/content-aware-sidebars-wpml\/","title":{"rendered":"Create Multilingual Sidebars Using Content Aware Sidebars and WPML"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>The <a href=\"https:\/\/wordpress.org\/plugins\/content-aware-sidebars\/\">Content Aware Sidebars<\/a> plugin lets you create an infinite number of custom sidebars and assign them to widgets based on the language of the contents on the page.<\/p>\n<p>The integration of Content Aware Sidebars with WPML allows you to set different sidebars for content in different languages.<\/p>\n<p>After collaborating with the author of Content Aware Sidebars, we managed to translate all the strings coming from the plugin.<\/p>\n<h2>What you will need:<\/h2>\n<ul>\n<li>A recent version of <a href=\"https:\/\/wpml.org\/purchase\/\">WPML<\/a> along with <a href=\"https:\/\/wpml.org\/pt-br\/download\/wpml-string-translation\/\">String Translation<\/a> and <a href=\"https:\/\/wpml.org\/pt-br\/download\/wpml-translation-management\/\">Translation Management <\/a>add-ons.<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/content-aware-sidebars\/\">Content Aware Sidebars<\/a> (version 3.1.1 or above).<\/li>\n<li><a href=\"https:\/\/wordpress.org\/plugins\/wpml-widgets\/\">WPML Widgets<\/a><\/li>\n<\/ul>\n<h2>Essential resources:<\/h2>\n<ul>\n<li>WPML\u2019s <a href=\"https:\/\/wpml.org\/documentation\/getting-started-guide\/\">Getting Started Guide<\/a> will guide you on how to easily setup WPML; you may also want to refer to the <a href=\"\/?p=455982\">WPML Widgets documentation<\/a>.<\/li>\n<li><a href=\"http:\/\/www.intox.dk\/en\/plugin\/content-aware-sidebars-en\/faq\/\">Content Aware Sidebars FAQs<\/a> will help you with the setup.<\/li>\n<\/ul>\n<h2>Creating different custom sidebars for different languages with Content Aware Sidebars and WPML<\/h2>\n<p>Before going into details, a summary of the 7 steps to be followed to translate the Content Aware Sidebar plugin outputs is as follows:<\/p>\n<ol>\n<li>Set WPML to register custom posts obtained from the Content Aware Sidebars for translation.<\/li>\n<li>Add a new sidebar to the default language.<\/li>\n<li>Add the custom posts to the translation basket.<\/li>\n<li>Choose whether the custom posts are to be translated by a local translator or a professional translation service.<\/li>\n<li>Translate the custom posts (by a local translator).<\/li>\n<li>Add a new sidebar for the secondary language.<\/li>\n<li>Assign widgets to the sidebars created based on the language of the page on which the sidebars are to be displayed.<\/li>\n<\/ol>\n<p>Let us start translating the Content Aware Sidebar plugin output by following the detailed steps shown below:<\/p>\n<ol>\n<li>Go to WPML &gt; Translation management &gt; Multilingual Content Setup, scroll down to the Custom posts section, and select the \u201ctranslate\u201d option for \u201cCondition Groups\u201d and \u201cSidebars.\u201d<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars-.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812536\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars--300x190.png\" alt=\"Translate condition groups and sidebars\" width=\"467\" height=\"296\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars--300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars--150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars--768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translate-condition-groups-and-sidebars--1024x650.png 1024w\" sizes=\"(max-width: 467px) 100vw, 467px\" \/><\/a><\/p>\n<ol start=\"2\">\n<li>Go to Sidebars &gt; Add new<\/li>\n<\/ol>\n<ol type=\"a\">\n<li>Add the sidebar for your primary language, which will be English in this case; note that you can check if your primary language selected from your WordPress admin bar.<\/li>\n<li>Chose conditional logic that suits your needs from the drop down menu and click on \u201cSave \u201cchanges\u201d and \u201cPublish.\u201d<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812540\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language-300x190.png\" alt=\"Add new sidebar to primary language\" width=\"471\" height=\"298\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language-300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language-150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language-768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-new-sidebar-to-primary-language-1024x650.png 1024w\" sizes=\"(max-width: 471px) 100vw, 471px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812541\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic-300x251.png\" alt=\"Select conditional logic\" width=\"425\" height=\"355\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic-300x251.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic-150x125.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic-768x642.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic-1024x857.png 1024w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-conditional-logic.png 1395w\" sizes=\"(max-width: 425px) 100vw, 425px\" \/><\/a><\/p>\n<ol start=\"3\">\n<li>Go to WPML &gt; Translation management<\/li>\n<\/ol>\n<ol type=\"a\">\n<li>Select Sidebar and Conditional Group.<\/li>\n<li>Click on the \u201cAdd to translation basket\u201d button.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812549\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket-300x190.png\" alt=\"Add to translation basket\" width=\"484\" height=\"307\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket-300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket-150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket-768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-to-translation-basket-1024x650.png 1024w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/a><\/p>\n<ol start=\"4\">\n<li>Go to WPML &gt; Translation management &gt; Translation basket tab.<\/li>\n<\/ol>\n<ol type=\"a\">\n<li>Go to the \u201cChoose translation options\u201d section and choose an option from the drop down menu.<\/li>\n<li>Select admin (local) if you are going to do the translation yourself or learn more about setting up a <a href=\"https:\/\/wpml.org\/documentation\/content-translation\/\">professional translation service<\/a>; then, click on Send all items for translation.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812556\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation-300x190.png\" alt=\"Send items for translation\" width=\"497\" height=\"315\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation-300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation-150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation-768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Send-items-for-translation-1024x650.png 1024w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<ol start=\"5\">\n<li>Go to <strong>WPML &gt; Translations<\/strong><\/li>\n<\/ol>\n<ol type=\"a\">\n<li>Add translations for the Condition Group and Sidebar by clicking on the \u201c<strong>Edit<\/strong>\u201d button<\/li>\n<li>Fill the title field with the translation of the secondary language and select \u201c<strong>This translation is finished<\/strong>\u201d and repeat the same steps for the body field. Scroll down and select \u201c<strong>Translation of this document is complete<\/strong>\u201d<\/li>\n<li>Click on the \u201c<strong>Save translation<\/strong>\u201d button.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar-.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812589\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar--300x190.png\" alt=\"Add translations for the Condition Group and Sidebar\" width=\"492\" height=\"312\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar--300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar--150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar--768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-translations-for-the-Condition-Group-and-Sidebar--1024x650.png 1024w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812595\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation-300x190.png\" alt=\"Save translation\" width=\"472\" height=\"299\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation-300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation-150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation-768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Save-translation-1024x650.png 1024w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete.png\"><img decoding=\"async\" class=\"wp-image-812598 aligncenter\" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete-300x188.png\" alt=\"Translation of this document is complete\" width=\"396\" height=\"248\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete-300x188.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete-150x94.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete-768x482.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete-1024x643.png 1024w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Translation-of-this-document-is-complete.png 1149w\" sizes=\"(max-width: 396px) 100vw, 396px\" \/><\/a><\/p>\n<ol start=\"6\">\n<li>Go back to Sidebars<\/li>\n<\/ol>\n<ol type=\"a\">\n<li>Click on the previously created English sidebar.<\/li>\n<li>Use the language switcher at the top to change the language to the desired language (secondary language); now you are on the sidebar translation page.<\/li>\n<li>Setup your sidebar translation and conditional logic similar to that shown in <a href=\"#id.hlihxl1n3v2h\">step 2<\/a>.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812607 \" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language-300x161.png\" alt=\"sidebar translation and conditional logic for secondary language\" width=\"393\" height=\"211\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language-300x161.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language-150x80.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language-768x412.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/sidebar-translation-and-conditional-logic-for-secondary-language.png 846w\" sizes=\"(max-width: 393px) 100vw, 393px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812612 \" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation-300x190.png\" alt=\"Secondary language sidebar translation\" width=\"493\" height=\"312\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation-300x190.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation-150x95.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation-768x488.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Secondary-language-sidebar-translation-1024x650.png 1024w\" sizes=\"(max-width: 493px) 100vw, 493px\" \/><\/a><\/p>\n<ol start=\"7\">\n<li>Go to Appearance &gt; Widgets and you should be able to see the newly created sidebars. Add desired widgets to the sidebars and make sure you select the language of appearance in each widget you choose. This option is available through the <a href=\"https:\/\/wordpress.org\/plugins\/wpml-widgets\/\">WPML Widgets<\/a> plugin.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812615 \" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar-300x187.png\" alt=\"Add widgets to sidebar\" width=\"487\" height=\"304\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar-300x187.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar-150x94.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar-768x480.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Add-widgets-to-sidebar-1024x640.png 1024w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget.png\"><img decoding=\"async\" class=\"aligncenter wp-image-812626 \" src=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget-300x187.png\" alt=\"Select language of widget\" width=\"485\" height=\"302\" srcset=\"https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget-300x187.png 300w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget-150x94.png 150w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget-768x480.png 768w, https:\/\/wpml.org\/wp-content\/uploads\/2016\/02\/Select-language-of-widget-1024x640.png 1024w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/a><\/p>\n<h2>Conclusion:<\/h2>\n<p>WPML, Content Aware Sidebars, and WPML Widgets will give you the option to have different sidebar instances for each language. This is done by setting custom posts for translation and then adding a sidebar in the default language, afterwards translating the custom posts and adding the sidebar in the secondary language. Through this, we can assign widgets to the sidebars created based on the language of the page on which the sidebars are to be displayed.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The Content Aware Sidebars plugin lets you create an infinite number of custom sidebars and assign them to widgets based on the language of the contents on the page. The integration of Content Aware Sidebars with WPML allows you to set different sidebars for content in different languages. After collaborating with the author of [&hellip;]<\/p>\n","protected":false},"author":76577,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"ep_exclude_from_search":false,"footnotes":""},"categories":[1371,8],"tags":[],"class_list":["post-812533","post","type-post","status-publish","format-standard","hentry","category-compatibility","category-tutorials"],"_links":{"self":[{"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/posts\/812533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/users\/76577"}],"replies":[{"embeddable":true,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/comments?post=812533"}],"version-history":[{"count":8,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/posts\/812533\/revisions"}],"predecessor-version":[{"id":1024482,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/posts\/812533\/revisions\/1024482"}],"wp:attachment":[{"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/media?parent=812533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/categories?post=812533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpml.org\/pt-br\/wp-json\/wp\/v2\/tags?post=812533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}