đź‘Ą

Salesforce Community Translation Using a Lightning Component

Please follow this step-by-step guide to set up the Formyoula Translate lightning component using the Napili template.

Step 1: Click on Setup which can be found on the top right corner of the page and go to Customize -> Communities -> All Communities. Select the community to which the Formyoula Translate component is to be added (click on “Community Workspace”).

image

Step 2: From Community Workspace click on the “Community Builder” icon as shown in the image below.

image

Step 3: The community builder page should open up as shown in the picture below. For this guide, we are using the Napili template.

image

Step 4: Click the Lightning icon to open the Components panel.

image

Scroll till the custom component section is found, “Social Translate” component should be visible.

Step 5: Drag and drop Social Translate custom component onto the page footer.

image

Step 6: Configuring Formyoula translate component to obtain the translation of page with desired settings (settings can be found to the left of the page as shown in the picture below), to do this please follow these steps carefully:

  • Selectors: This is a required property for Social translate to function, by default this has been populated with all basic selectors of community page. If their are any additional selectors to be added then it can be done by adding a comma at the end of the string and add the desired text.
  • Selectors to be skipped: This can be specified if there are any selectors whose text need not be translated. If their are multiple selectors then they can be specified with a comma separator.
  • Interval: This should be defaulted to 1 second, this defines how often the social translate algorithm is to be executed.
  • Subscription: This is defaulted to “trail” and this can be changed if an appropriate subscription id is provided by Social Translate providing company.
  • Disable from language: If checked to true then users won’t be able to see from language the text is being translated, instead would just see translated text.
  • Need line breaks: This property will enable line breaks to be retained after translation.
  • Text to skip: Property to specify if their is any string which need not be translated. If their are more than one string to be omitted then this can be achieved by providing comma separated string.
  • No Translation: Property used to specify any string which has no translation and can be skipped.
  • IFrame Selectors: Property used to specify any iframe selectors that exist on the page whose content is to be translated.
  • Text to replace from: Property which allows the user to explicitly specify a text to be replaced with a specified text.
image

Step 7: Once the configuration is completed, then go ahead and publish the community.

image