Alexander ten Bruggencate wrote:
> 
> After using the tag <article lang="nl">, generated text (words like
> "Chapter" or "Table of Contents") still appear in english. What do I
> have to do to get XXE to generate dutch words?

The basic idea is to improve the DocBook CSS stylesheet
(<distrib>/css/docbook41.css) by adding localized rules such as:

chapter > title:before {
    content: "Chapter " counter(n-, upper-roman) "\A";
}
chapter[lang=fr] > title:before {
    content: "Chapitre " counter(n-, upper-roman) "\A";
}

By doing it this way, the stylesheet works for both unspecified "lang"
(fallbacks to English) and French.

Note that there is a problem with the DocBook DTD which uses the "lang"
non-standard, ``local'', attribute instead of the "xml:lang" standard,
``global'', attribute.

Unlike "lang", "xml:lang" is ``inherited'' by the descendant elements
contained in a element specifying this attribute. Therefore you
generally have to add "xml:lang" only to the root element of your
document while you'll have to add "lang" on all elements that need to be
localized.

PS: With "xml:lang" instead of "lang", the CSS rule must be written like
this:

chapter:lang(fr) > title:before {
    content: "Chapitre " counter(n-, upper-roman) "\A";
}

Reply via email to