2022.2

Table Of Contents
policiesortermsandconditions.
l
Forlongertextsitisrecommendedtouseacontent management systemincombinationwith
scripts.
l
Itisalsopossibletousesnippetsorseparatesectionsfortranslationpurposesincombination
withscripts.
Translating a template
Tomakeuseofthebuilt-intranslationfeature,takethefollowingsteps.
1. Tagcontentfortranslation.See"Taggingelementsfortranslation"below.
2. Optional:enablethepluralizationoptiononanytranslationentrythatshouldconformwiththe
numberinacertaindatafield;see"Pluralization"onpage860.
3. ExporttheentriesontheTranslationspanetoa.potfile.See"Exportingafilefortranslation
(.pot)"onpage861.
4. Openthe.potfileinatranslationtool(e.g.Poedit),translatethetextsand/orenterthe(textwith)
plurals.
Or,ifyouworkwithatranslatorortranslationagency,sendthemthe.potfile.
Theresultisa.pofile(oneperlanguage).
5. Importthe.pofileorfiles.See"Importingtranslations(.po)"onpage862.
6. Setthetemplate'sLocale,orselectthefieldthatcontainsaLocalevalue,inordertogetoutputin
thecorrectlanguage.See"Changingthelocale"onpage706.
Translatingsnippets
"Snippets"onpage661gettranslatedwhentheyareinsertedintheoutput,ifthetextistaggedfortrans-
lation(see"Taggingtextinsnippets"onpage859).
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859).
Translatingcontentviaascript
Ifatemplatehasbeenpreparedfortranslation,personalizationscriptsthataddcontenttotheoutput
maytranslatethatcontentusingthe"translate()"onpage1270function.
Tagging elements for translation
Inordertomarktextfortranslation,youhavetotagtheHTMLelementthatholdsthetext.
Page 857