On 17 May 2017, at 17:35, Hussein Shafie wrote:
On 05/17/2017 02:22 PM, Leif Halvard Silli wrote:
A Docbook or DITA (at least DITA Book map) documents with the root
element set to e.g. Frenchh (xml:lang="fr") will, when converted to -
for example - XHTML, display user readable phrases such as 'Chapter',
'Table of Contents' and so on, in the language of the root element -
French (with English as fallback when specified language is not
supported, or when 'en' is specified).
For DocBook conversion, I noticed that Danish, Swedish, and Russian
is
supported too, and probably other languages as well. And for DITA
there
is at least support for Frenchn and German.
But, praying for my own sick mother, when setting the root element to
Norwegian Bokmål (xml:lang='nb') or Norwegian Nynorsk
(xml:lang='no') or
unspecified Norwegian (xml:lang='no'), there is no effect.
How can should/could should this be solved? Is this an XXE issue, an
XSL-FO converter issue, a DITA converter or e.g. a DocBook XSL issue?
Incidently, most or all of these terms are translated in a XXE
localization. For instance, the localization for 'Chapter' could be
taken from
|<trans-unit id="3109" resname="chapterTemplate"
xml:space="preserve">
<source>Chapter</source> <target>Kapittel</target> </trans-unit> |
XXE does not "share" its localized messages with the following
software components:
- DocBook XSL stylesheets,
- XMLmind DITA Converter.
XMLmind is not the developer of "DocBook XSL stylesheets" and that's
why we cannot explain why setting xml:lang='no' on the root element of
a DocBook 5 document does not have the desired effect.
First I want to point out that before I posted this comment, I did test,
in two user accounts on my computer, that it did NOT work for Norwegian
Nynorsk and Bokmål. And I have also suffered from this problem earlier.
But then Jirka pointed (in a comment that has not reached the list yet)
to a web page that shows that 'nn' and 'nb' in fact are supported by the
DocBook XSL stylesheets, and he also mentioned that xinclude could
interfere with language inheritance. I did not use xinclude. But his
comment made me test whether there would be any difference between
converting from DocBook 4.5 vs converting from DB 5.0 vs converting from
db 5.1. (I might be incorrect, but I thought that xinclude perhaps was
not part of DocBook 4.5, and in addition, (based on what attributes XXE
makes available to users), DocBook 4.5 uses the @lang attribute, whereas
DB 5.x uses the @xml:lang attribute.)
To my surprise, when converting my DB 4.5 test document, the Norwegian
Nynorsk and Bokmål localizations became available.
And, even better, after I had converted the DB 4.5 document, the 'nn'
and 'nb' resources became available also when converting DB 5.x
documents. Thus I am left with the impression that running the
conversion of the DB 4.5 document, had the effect of enabling these
languages for DB 5.x conversion as well ... (I would need to test on
another computer, where I have not used DB 4.5 conversion yet, to see
whether my suspicion is correct.)
About XMLmind DITA Converter now. You may want to contribute a nb.xml
and no.xml translation files. (We already have cs.xml de.xml en.xml
es.xml fr.xml it.xml pl.xml ru.xml.)
How to "develop" this kind of XMLmind DITA Converter "extension" is
explained here:
XMLmind DITA Converter Manual, Appendix C. Translating the messages
generated by ditac
http://www.xmlmind.com/ditac/_distrib/doc/manual/translating_messages.html
You'll find the corresponding files in an XXE distribution in
XXE_install_dir/addon/config/dita/xsl/common/
Thanks a lot for this information.
--
leif halvard silli
--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support