Handle several languages in one CSS customization file for PDF output

Post here questions and problems related to editing and publishing DITA content.
plnrlt
Posts: 2
Joined: Thu Feb 06, 2020 1:29 pm

Handle several languages in one CSS customization file for PDF output

Post by plnrlt »

Hello,
I use a customized css file to handle the layout of my PDFs, using the DITA Map PDF - based on HTML5 & CSS scenario in Oxygen XML Editor 23.1. Until now, I created one file for each language we use in our documentation but it is painful to update, so I was wondering if I could define rules so the right string is generated in the PDF depending on the content's xml:lang attribute.
I had a look around and found solutions with selectors like *[lang|="language code"] , :lang(language code) and others, but I can't figure out where to place them. I always get "unrecognized" errors.

Here is an example of content I would like to localize:

Code: Select all

/* Front page customization */
@page front-page {

    /* Add legal info at the bottom of the page */
    @bottom-center {
    content: "Original instructions. Do not distribute without our prior consent."; /* TO LOCALIZE */
    color: rgb(96, 96, 96);
    font-size: 11pt;
    border-top: 0px;   
    }
  }
What could I use here to also define the French and the German translation of the content in the same file?

Thanks a lot for your help and have a nice day!
Pauline