From: Petter Reinholdtsen Date: Fri, 10 Aug 2012 18:59:03 +0000 (+0000) Subject: New post. X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/commitdiff_plain/45484dd87ee83d0a7a0c99dcbfa127db61114d07?ds=sidebyside New post. --- diff --git a/blog/data/2012-08-10-docbook-nb.txt b/blog/data/2012-08-10-docbook-nb.txt new file mode 100644 index 0000000000..7ba523d0d7 --- /dev/null +++ b/blog/data/2012-08-10-docbook-nb.txt @@ -0,0 +1,47 @@ +Title: Notes on language codes for Norwegian docbook processing... +Tags: english +Date: 2012-08-10 21:00 + +

In docbook one can specify +the language used at the top, and the processing pipeline will use +this information to pick the correct translations for 'chapter', 'see +also', 'index' etc. And for most languages used with docbook, I guess +this work just fine. For example a German user can start the document +with <book lang="de">, and the document will show up with the +correct content with any of the docbook processors. This is not the +case for the language +I +am working with at the moment, Norwegian Bokmål.

+ +

For a while, I was confused about which language code to use, +because I was unable to find any language code that would work across +all tools. I am currently testing dblatex, xmlto, docbook-xsl, and +dbtoepub, and they do not handle Norwegian Bokmål the same way. Some +of them do not handle it at all.

+ +

A bit of background information is probably needed to understand +this mess. Norwegian is not one, but two written variants. The +variants are Norwegian Nynorsk and Norwegian Bokmål. There are three +two letter language codes associated with these languages, Norwegian +is 'no', Norwegian Nynorsk is 'nn' and Norwegian Bokmål is 'nb'. +Historically the 'no' language code was used for Norwegian Bokmål, but +many years ago this was found to be å bad idea, and the recommendation +is to use the most specific language code instead, to avoid confusion. +In the transition period it is a good idea to make sure 'no' was an +alias for 'nb'.

+ +

Back to docbook processing tools in Debian. The dblatex tool only +understand 'nn'. There are translations for 'no', but not 'nb' (BTS +#684391), but due to a bug +(BTS #682936) the 'no' +language code is not recognised. The docbook-xsl tool chain only +recognise 'nn' and 'nb', but not 'no'. The xmlto tool only recognise +'nn' and 'nb', but not 'no'. The end result that there is no language +code I can use to get the docbook file working with all of these tools +at the same time. :(

+ +

The correct solution is to use <book lang="nb">, but it will +take time before that will work with all the free software docbook +processors. :(

+ +

Oh, the joy of well integrated tools. :/