Language Dependencies

You can choose which text of the reference will display and what kind of reference will be used automatically depending on the language set to your text in the Character Styles -> Advanced Character Formats or in the bottom part of InDesign's Character panel1

When editing an element or character override of static text, press the  button in the Insert/Modify format element dialog and choose the languages in which the element should display.

Attribute lang="..." will be added to your element indicating languages where such element will display.

Now let's take one more look at the reference we've created in "How to make a localized relative page reference" on page.

This is the format definition, which will display relative page references in French when in French text and nothing in any other text.

< pagenum lang="French;French: Canadian" usepage="true" pagetext="page numéro #" usethis="true" thistext="cette page" usenext="true" nexttext="prochaine page" useprev="true" prevtext="page précédente" useopposite="true" oppositetext="page opposée"/>

This element will only display English relative page references in any English text:

< pagenum lang="English: USA;English: UK;English: Canadian" usepage="true" pagetext="page #" usethis="true" thistext="this page" usenext="true" nexttext="next page" useprev="true" prevtext="previous page" useopposite="true" oppositetext="opposite page"/>

When we combine the two, we get a self-localizing page reference for English/French publications:

< pagenum lang="English: USA;English: UK;English: Canadian" usepage="true" pagetext="page #" usethis="true" thistext="this page" usenext="true" nexttext="next page" useprev="true" prevtext="previous page" useopposite="true" oppositetext="opposite page"/>< pagenum lang="French;French: Canadian" usepage="true" pagetext="page numéro #" usethis="true" thistext="cette page" usenext="true" nexttext="prochaine page" useprev="true" prevtext="page précédente" useopposite="true" oppositetext="page opposée"/>

If we want to say more then just "Page #", or "this page, we can add localized static text "See" for English and "Voir" for French the same way:

< span lang="French;French: Canadian">Voir< /span>< span lang="English: USA;English: UK;English: Canadian">See< /span> < pagenum lang="English: USA;English: UK;English: Canadian" usepage="true" pagetext="page #" usethis="true" thistext="this page" usenext="true" nexttext="next page" useprev="true" prevtext="previous page" useopposite="true" oppositetext="opposite page"/>< pagenum lang="French;French: Canadian" usepage="true" pagetext="la page numéro #" usethis="true" thistext="cette page" usenext="true" nexttext="la prochaine page" useprev="true" prevtext="la page précédente" useopposite="true" oppositetext="la page opposée"/>

Note that French grammar required an addition of the article before some of the relative references to combine with "Voir"

Now we create a reference to this story in text set as French: Voir cette page

Now the copy pasted reference in English text: See this page

reference in English text: See this page