2022.2

Table Of Contents
TheseclassescanbeusedtostylethetableofcontentswithCSS.TheprinciplesofstylingwithCSS
areexplainedinanothertopic:"StylingtemplateswithCSSfiles"onpage261.
AddthefollowingstylestothestylesheetforthePrintcontext(see"Step1:editCSS"onpage265)to
alignthepagenumbertotherightandfillthespacebetweenthetextandthepagenumberwithleader
dots.
p.toc-entry {
display: flex;
margin: 0 0 0.25em 0;
}
p.toc-entry .text {
flex-shrink: 0;
}
p.toc-entry .dots {
flex-shrink: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: clip;
}
p.toc-entry .dots::after {
font-weight: normal;
content: ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . ";
}
p.toc-entry .number {
flex-shrink: 1;
text-align: right;
font-weight: bold;
}
ThesestylesmakeuseoftheCSSFlexboxLayoutModule.Formoreinformationaboutthat,see
W3schools:CSSFlexbox.
Translating templates
OLConnecthasabuilt-infeaturetoautomaticallygenerateoutputandpreviewsfromonetemplatein
differentlanguages,andtopluralizecertainwordsintheoutput.
WhenOLConnectgeneratesoutputorcreatesapreviewforatemplate,itlooksforatranslationfile
thatmatchesthecurrent"Locale"onpage295.Ifthereisone,OLConnectusesittolocalizeanyele-
mentsthataretaggedfortranslation,andtopluralizewordsasindicated.
Forthisfeaturetowork,atemplateneedstohave:
l
Contentthatistagged for translation(see:"Taggingelementsfortranslation"onthenextpage)
and,optionally,pluralization(see"Pluralization"onpage420).
l
Oneormoretranslation files(.po).Eachfilegivestranslationsinonelanguage.
ThefilesthatholdtheactualtranslationsarenotmadeintheDesigner.Theycanbemadeinanytrans-
lationtoolthatacceptsa.potfileasinput,andoutputs.pofiles.
Page 415