How to localize CSS generated content from Docbook l10n file
Posted: Thu May 14, 2015 6:55 pm
I'd like to customize my framework CSS to generate content using the docbook localization files (oxygen_home/frameworks/docbook/xsl/common). I see there is a function described for localization of css,
But this uses the frameworks translation.xml file. Would using the oxy_xpath function as follows be a practical solution?
Would this cause the en.xml file to be opened multiple times and degrade performance or would it be cached (or is there a way to open once and cache) Is there a better way?
Steve
Code: Select all
title:before{
content:"${i18n(title.key)} : ";
}
Code: Select all
chapter > title:before,
chapter > info > title:before{
content:
oxy_xpath("doc('frameworks/docbook/xsl/common/en.xml'/l:l10n/l:gentext[@key='chapter'][1]/@text") counter(chapter_count, decimal) ": ";
counter-increment:chapter_count;
}
Steve