2022.2

Table Of Contents
Translatingsnippets
"Snippets"onpage250gettranslatedwhentheyareinsertedintheoutput,ifthetextistaggedfortrans-
lation(see"Taggingtextinsnippets"onpage419).
Translatingcontentthatisinsertedbyascript
Personalizationscriptsmayaddcontenttotheoutput.OLConnectwillapplytranslationstothatcon-
tentatthemomentitisaddedtothetemplate,forexamplewiththehtml()orreplaceWith()func-
tion.Translationsareappliedifthatcontentismarkedfortranslation,andifthereisamatching
translationentry(see"Taggingtextthatisinsertedbyascript"onpage419).
Translatingcontentviaascript
Ifatemplatehasbeenpreparedfortranslation,personalizationscriptsthataddcontenttotheoutput
maytranslatethatcontentusingthe"translate()"onpage814function.
Tagging elements for translation
Inordertomarktextfortranslation,youhavetotagtheHTMLelementthatholdsthetext.
Whenyouaddelements,suchastext,imagesoratable,tothecontentofatemplate,youareactually
constructinganHTMLfile.ItispossibletoeditthesourceoftheHTMLfiledirectlyintheDesigner;see
"EditingHTML"onpage171.
However,totaganelementfortranslation,youdon'thavetogointotheSourceview.
1. PlacethecursorinthetextthatshouldbetranslatedandselecttheHTMLelementinthebread-
crumbs(see"Selectinganelement"onpage174)orselecttheelementviatheOutlineview.Ele-
mentsthatcontaintextareparagraphs,headings,tablecells,buttons,labelsetc.
2. OpentheTranslationspane.Ifitisn'tvisible,select:Window > Show View > Translationsfrom
themenu.
3. ClicktheTag ElementbuttoninthetoolbaroftheTranslationspane.Thisaddsthedata-
translateattributetotheelement.(Attributesarevisibleonthe"Sourcetab"onpage533.)
Iftherewasnotranslationentrywiththesametextalready,thetextofthetaggedelementiscopiedtoa
newtranslationentryontheTranslationspane.
OnetranslationentryworksforallHTMLelementsthataretaggedfortranslationandhaveexactlythe
sametext.
Remember,onlytextinHTMLelementsthataretaggedfortranslationgettranslatedintheout-
put.
Page 417