{"id":20899,"date":"2020-06-03T21:12:21","date_gmt":"2020-06-03T21:12:21","guid":{"rendered":"https:\/\/www.globalizationpartners.com\/?p=20899"},"modified":"2020-08-04T10:18:24","modified_gmt":"2020-08-04T10:18:24","slug":"community-pages-localization-in-salesforce-part-1","status":"publish","type":"post","link":"https:\/\/www.globalizationpartners.com\/2020\/06\/03\/community-pages-localization-in-salesforce-part-1\/","title":{"rendered":"Community Pages Localization in Salesforce: Part 1"},"content":{"rendered":"<p>This is the first blog in a series about Community Pages localization in Salesforce. In this blog, we\u2019ll cover some of the aspects you need to consider when using the Community Builder. In the second part, we\u2019ll cover topics related to Translation Workbench.<\/p>\n<h2>Language Selector<\/h2>\n<p>The Salesforce Community Builder provides you with some nice features to make the localization process easier. One of the most important features is the <strong>Languages<\/strong> section inside of the <strong>Settings<\/strong> panel:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20900\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-1.png\" alt=\"\" width=\"1033\" height=\"837\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-1.png 1033w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-1-300x243.png 300w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-1-768x622.png 768w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-1-1024x830.png 1024w\" sizes=\"(max-width: 1033px) 100vw, 1033px\" \/><\/p>\n<p>The<strong> Languages<\/strong> section allows you to define the different languages that you want your community to support (at the time of writing this blog, Salesforce Community Builder allows you to pick between 132 languages). Also, this section allows you to pick a default language for your community, which is the language in which your community initially displays. When adding a language, you can specify a <strong>Fallback language<\/strong> (typically the default language), which is displayed when the content is not available in the current language.<\/p>\n<p>In regard to how Salesforce handles languages for community visitors, please consider the below:<\/p>\n<ul>\n<li>For guest users, the community will display in the default language and will provide a <strong>Language Selector<\/strong>, allowing them to pick between the available languages. This language selector is a component and can be added to your community from the <strong>Components <\/strong>section.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20905\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-2.png\" alt=\"\" width=\"359\" height=\"231\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-2.png 359w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-2-300x193.png 300w\" sizes=\"(max-width: 359px) 100vw, 359px\" \/><\/p>\n<ul>\n<li>For authenticated users, the language will be selected automatically based on their profile language.<\/li>\n<\/ul>\n<h2>Exporting\/Importing Content for Translation<\/h2>\n<p>The languages section also provides a feature to export content for translation and import translations back. If you need to export content for translation, you must click on the export content button. By doing that, it will show a popup with the list of enabled languages. You must pick a language and then click on the export button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20910\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-3.png\" alt=\"\" width=\"703\" height=\"536\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-3.png 703w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-3-300x229.png 300w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/p>\n<p>Typically, you\u2019ll be picking the source language in this step. For example, in my case I have the community in English (US) and I want to translate it into French and Simplified Chinese. I should select English (US) from the list of languages. The exported file will have a format like the following:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20915\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-4.png\" alt=\"\" width=\"996\" height=\"421\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-4.png 996w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-4-300x127.png 300w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-4-768x325.png 768w\" sizes=\"(max-width: 996px) 100vw, 996px\" \/><\/p>\n<p>In this file, you can replace the English with the corresponding translation (maintaining the CDATA tags and all the structure).<\/p>\n<p>Notice that both components have a <strong>language=\u201cen_US\u201d<\/strong> attribute. This is important to change in all the component tags from the file before importing to have the corresponding ISO code. For example, for the following setup for French, the language code should be <strong>language=\u201cfr\u201d.<\/strong><\/p>\n<p><b><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20920\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-5.png\" alt=\"\" width=\"774\" height=\"376\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-5.png 774w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-5-300x146.png 300w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-5-768x373.png 768w\" sizes=\"(max-width: 774px) 100vw, 774px\" \/><\/b><\/p>\n<p>In the same way, for Simplified Chinese it should have the <strong>language=\u201czh_CN\u201d<\/strong> attribute.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20925\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-6.png\" alt=\"\" width=\"772\" height=\"377\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-6.png 772w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-6-300x147.png 300w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-6-768x375.png 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/p>\n<p>Once the file is fully translated, you\u2019ll be able to import the translations by clicking the import button from the Languages section and then uploading the XML file:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20930\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-7.png\" alt=\"\" width=\"728\" height=\"492\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-7.png 728w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-7-300x203.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>Sometimes, it can happen that some content from the community is not exported in the XML. In these cases, you\u2019ll have to:<\/p>\n<ul>\n<li><strong>Populate the translations manually in the Community Builder<\/strong>. This can be done by switching the language:<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20935\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-8.png\" alt=\"\" width=\"214\" height=\"283\" \/><\/p>\n<ul>\n<li>Then populating the translation in the component:<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20940\" src=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-9.png\" alt=\"\" width=\"1324\" height=\"671\" srcset=\"https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-9.png 1324w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-9-300x152.png 300w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-9-768x389.png 768w, https:\/\/www.globalizationpartners.com\/wp-content\/uploads\/2020\/06\/Sales-Force-Community-Pages-9-1024x519.png 1024w\" sizes=\"(max-width: 1324px) 100vw, 1324px\" \/><\/p>\n<h3>Summary<\/h3>\n<p>In this blog we covered how to localize Community Pages in Salesforce using the Community Builder. The Community Builder allows you to select which languages you want to display, your default language and your fallback language. I also covered exporting content for translations and importing the translated content back in.<\/p>\n<p>In the next blog in this series, I will discuss topics related to Translation Workbench.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the first blog in a series about Community Pages localization in Salesforce. In this blog, we\u2019ll cover some of the aspects you need to consider when using the Community Builder. In the second part, we\u2019ll cover topics related to Translation Workbench. Language Selector The Salesforce Community Builder provides you with some nice features [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":20961,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[1737,1240],"_links":{"self":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/20899"}],"collection":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/comments?post=20899"}],"version-history":[{"count":15,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/20899\/revisions"}],"predecessor-version":[{"id":20959,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/posts\/20899\/revisions\/20959"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/media\/20961"}],"wp:attachment":[{"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/media?parent=20899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/categories?post=20899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.globalizationpartners.com\/wp-json\/wp\/v2\/tags?post=20899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}