We've launched a new support center at help.smartling.com. This site will continue to be maintained into January 2017. Please update your bookmarks.
Follow

Smartling HTML and Javascript Integration Summary

The following article applies to Global Delivery Network project types. 

The following is a list of Smartling-specific html and javascript elements that you can use to integrate your code with the Smartling Translation Management platform.

Element Description
data-sl-variant By using the data-sl-variant HTML attribute within a block tag that encloses a string, you can specify alternate text and then assign a numeric or text value to distinguish the string.
See About Variants - Global Delivery Network
sl_swap To swap content, tag the source HTML content that you want to localize with the <sl_swap> class, ingest content in one of your target languages, and it appears on in Smartling at Global Delivery Network > Content Swaps where you can enter the localized HTML.
  You can also swap content in the head of a page.
See Excluding or Specifying Content in the <head> of a page
sl_hide To exclude content from translation and hide the original content on the translated site, use <sl_hide>. This differs from the HTML class name "notranslate" which excludes the content from translation, but displays the original content on the translated site.
See How to Hide Content
sl_whiteout Use the <sl_whiteout> class to whiteout HTML content so that it does not appear for translators and editors reviewing the site.
See How to Whiteout Content
SL_opaque By using a class of “SL_opaque,” any HTML inside the opaque element will be rendered exactly as it appears on the original site, including any links.
See How to Leave Links and Content Unchanged (Opaque)
SL_norewrite

Using the class <SL_norewrite> keeps the source link intact but has Smartling allow for translation of the text strings.
See Handling Link Rewrites

SL_sort The class <SL_sort> helps you sort translated text in ascending order.
See Sorting Translated Content
SL_sort_desc The class <SL_sort_desc> class helps you sort translated text in descending order.
See Sorting Translated Content
sl_split To reduce overall word count and avoid retranslating a string, you can add the class <sl_split> to the span tags.
See How to Force Alternate Content Parsing
sl_translate The class <sl_transate> allows you to create a comma-delimited list of json key names whose values should be translated.
See How to Process JSON for Translation
sl_all sl_none The class <sl_all> or <sl_none> also allows you to create a list of json key names whose values should be translated.
See How to Process JSON for Translation
sl:translate To include javascript blocks for translation, use the comments <sl:translate> and </sl:translate>
See How to Process JavaScript for Translation
sl:notranslate To exclude java script blocks for translation, use comments <sl:notranslate> and </sl:notranslate>
See How to Process JavaScript for Translation
sl:translate_html Smartling supports translating plain and escaped HTML content within JavaScript using the comment <sl:translate_html>
See How to Process JavaScript for Translation

            

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk