[dev-context] Improved support for Norwegian in ConTeXt

Karl Ove Hufthammer karl at huftis.org
Sun Feb 4 15:00:46 CET 2007

I'm writing this to suggest improvements in ConTeXt's support for the 
Norwegian languages. ConTeXt already has rudimentary support for Norwegian, 
but with some problems.

Language codes

The main problem is that ConTeXt use the language code 'no' for Norwegian. 
There actually *is* no written language called 'Norwegian'; Norway has two 
official written languages, Norwegian Bokmål (ISO 639 language code 'nb') and 
Norwegian Nynorsk (ISO 639 language code 'nn'). The current definitions 
for 'no' in ConTeXt is for Norwegian Bokmål. (There is a ISO 639 language 
code 'no' for Norwegian, but this should usually be used for spoken 
Norwegian, or perhaps for transcriptions of spoken language.)

The language code 'no' should be removed, and be replaced by the two language 
codes 'nb' and 'nn'.

See http://en.wikipedia.org/wiki/Norwegian_language for a (not too good) 
article on the Norwegian languages.

For the record, the language names used in LaTeX/Babel is 
(unfortunately) 'Norwegian' and 'norsk' for Norwegian Bokmål, and 'nynorsk' 
for Norwegian Nynorsk, instead of 'bokmal'/'bokmål' and 'nynorsk'. Norwegian 
Bokmål support was added first, and used up the 'Norwegian' name.


The two written language are quite similar, and the current hyphenation 
dictionary (nohyphbx) was made to support both. But there are (at least) two 
words which are put in the hyphenation exceptions for this dictionary because 
they would have different hyphenation (because of different meaning) in 
Norwegian Nynorsk and Norwegian Bokmål. These are:

attende -- nb: at-ten-de ('eighteenth'),       nn: att-en-de ('back')
betre   -- nb: be-tre ('enter'/'set foot on'), nn: bet-re ('better')

Would it be possible to have two different hyphenation dictionaries for 'nb' 
and 'nn', which would only differ in the hyphenation exceptions used for 
these two words?

Language setup

Here is an improved/correct version of the language setup for Norwegian. The 
setup for 'no' should be removed.

   date={day,{.},\ ,month,\ ,year},

This is for Norwegian Nynorsk ('nn'), but the same setup is used for Norwegian 
Bokmål (the values used for 'day' differ, though -- see below).

But I am not sure I understand what the four *sentence commands are used for. 
We usually don't use em-dashes in Norwegian, so the entries look incorrect. 
If you can explain what the commands are used for, I can supply the correct 
Norwegian definitions.

I also noticed that the Italian definitions use leftspeech, middlespeech and 
rightspeech commands. What are these used for?

Other language-specific settings

Norwegian (Bokmål and Nynorsk) differs typographically from English in several 
other ways. Here is three of them:

We don't (usually) use bullets for the first level of unnumbered lists; we use 

-- Item 1
-- Item 2
-- Item 3

Bullets are commonly seen in document created by word processors of US origin, 
and in the documents created by people without proper typographic training, 
though. It would be nice if ConTeXt could use en-dashes by default for lists 
in Norwegian text.

We don't use full stops in numbered lists. In other words, instead of

1. Item 1
2. Item 2
3. Item 3

we write

1  Item 1
2  Item 2
3  Item 3

The same holds for numbered headings, both in the main text and in the TOC.

Would it be possible to support this by default in ConTeXt?

We also use the comma in decimal numbers (3,14 instead of 3.14).

Norwegian labels

Here is labels for Norwegian (Bokmål and Nynorsk). The old 'no' labels should 
be removed. The 'nb' ones are taken from the 'no' ones, but with some 

Some comments: We don't usually capitalise the first letter in 
crossreferences. Where one would in English write

See Figure 5.22 ...

we would write

Se figur 5.22 ... (Bokmål)
Sjå figur 5.22 ... (Nynorsk)

But we would of course write

Figur 5.22 viser ...
(Figure 5.22 shows ...)

The definitions below use a capital first letter. Will this be a problem?

I was also unsure about what the 'lines' label should be. The plural of 'line' 
('linje') in Norwegian (both 'nb' and 'nn') is 'linjer', but we do not use 
the plural when referencing more than one line. Where one would write

The discussion on lines 5--13 ...

in English, we would write

Drøftinga på linje 5--13 ...

in Norwegian. In other words, we use the singular instead of the plural. The 
same holds for the other cross-referencing terms ('Figure', 'Table' &c.).

Feel free to change the 'lines' label to 'linje' if this make it work better.

\setupheadtext [\s!nb] [\v!content=Innhold]
\setupheadtext [\s!nn] [\v!content=Innhald]

\setupheadtext [\s!nb] [\v!tables=Tabeller]
\setupheadtext [\s!nn] [\v!tables=Tabellar]

\setupheadtext [\s!nb] [\v!figures=Figurer]
\setupheadtext [\s!nn] [\v!figures=Figurar]

\setupheadtext [\s!nb] [\v!graphics=Bilde]
\setupheadtext [\s!nn] [\v!graphics=Bilete]

\setupheadtext [\s!nb] [\v!intermezzi=Intermesso]
\setupheadtext [\s!nn] [\v!intermezzi=Intermesso]

\setupheadtext [\s!nb] [\v!index=Register]
\setupheadtext [\s!nn] [\v!index=Register]

\setupheadtext [\s!nb] [\v!abbreviations=Forkortelser]
\setupheadtext [\s!nn] [\v!abbreviations=Forkortingar]

\setupheadtext [\s!nb] [\v!logos=Logoer]
\setupheadtext [\s!nn] [\v!logos=Logoar]

\setupheadtext [\s!nb] [\v!units=Enheter]
\setupheadtext [\s!nn] [\v!units=Einingar]

\setuplabeltext [\s!nb] [\v!table=Tabell ]
\setuplabeltext [\s!nn] [\v!table=Tabell ]

\setuplabeltext [\s!nb] [\v!figure=Figur ]
\setuplabeltext [\s!nn] [\v!figure=Figur ]

\setuplabeltext [\s!nb] [\v!intermezzo=Intermesso ]
\setuplabeltext [\s!nn] [\v!intermezzo=Intermesso ]

\setuplabeltext [\s!nb] [\v!graphic=Bilde ]
\setuplabeltext [\s!nn] [\v!graphic=Bilete ]

\setuplabeltext [\s!nb] [\v!chapter=]
\setuplabeltext [\s!nn] [\v!chapter=]

\setuplabeltext [\s!nb] [\v!section=]
\setuplabeltext [\s!nn] [\v!section=]

\setuplabeltext [\s!nb] [\v!subsection=]
\setuplabeltext [\s!nn] [\v!subsection=]

\setuplabeltext [\s!nb] [\v!subsubsection=]
\setuplabeltext [\s!nn] [\v!subsubsection=]

\setuplabeltext [\s!nb] [\v!subsubsubsection=]
\setuplabeltext [\s!nn] [\v!subsubsubsection=]

\setuplabeltext [\s!nb] [\v!appendix=] % Tillegg
\setuplabeltext [\s!nn] [\v!appendix=] % Tillegg

\setuplabeltext [\s!nb] [\v!part=Del]
\setuplabeltext [\s!nn] [\v!part=Del]

\setuplabeltext [\s!nb] [\v!line=linje ]
\setuplabeltext [\s!nn] [\v!line=linje ]

\setuplabeltext [\s!nb] [\v!lines=linjer ]
\setuplabeltext [\s!nn] [\v!lines=linjer ]

\setuplabeltext [\s!nb]   [\v!january=januar]
\setuplabeltext [\s!nb]  [\v!february=februar]
\setuplabeltext [\s!nb]     [\v!march=mars]
\setuplabeltext [\s!nb]     [\v!april=april]
\setuplabeltext [\s!nb]       [\v!may=mai]
\setuplabeltext [\s!nb]      [\v!june=juni]
\setuplabeltext [\s!nb]      [\v!july=juli]
\setuplabeltext [\s!nb]    [\v!august=august]
\setuplabeltext [\s!nb] [\v!september=september]
\setuplabeltext [\s!nb]   [\v!october=oktober]
\setuplabeltext [\s!nb]  [\v!november=november]
\setuplabeltext [\s!nb]  [\v!december=desember]

\setuplabeltext [\s!nn]   [\v!january=januar]
\setuplabeltext [\s!nn]  [\v!february=februar]
\setuplabeltext [\s!nn]     [\v!march=mars]
\setuplabeltext [\s!nn]     [\v!april=april]
\setuplabeltext [\s!nn]       [\v!may=mai]
\setuplabeltext [\s!nn]      [\v!june=juni]
\setuplabeltext [\s!nn]      [\v!july=juli]
\setuplabeltext [\s!nn]    [\v!august=august]
\setuplabeltext [\s!nn] [\v!september=september]
\setuplabeltext [\s!nn]   [\v!october=oktober]
\setuplabeltext [\s!nn]  [\v!november=november]
\setuplabeltext [\s!nn]  [\v!december=desember]

\setuplabeltext [\s!nb]    [\v!sunday=s\ostroke ndag]
\setuplabeltext [\s!nb]    [\v!monday=mandag]
\setuplabeltext [\s!nb]   [\v!tuesday=tirsdag]
\setuplabeltext [\s!nb] [\v!wednesday=onsdag]
\setuplabeltext [\s!nb]  [\v!thursday=torsdag]
\setuplabeltext [\s!nb]    [\v!friday=fredag]
\setuplabeltext [\s!nb]  [\v!saturday=l\ostroke rdag]

\setuplabeltext [\s!nn]    [\v!sunday=sundag]
\setuplabeltext [\s!nn]    [\v!monday=m\aring ndag]
\setuplabeltext [\s!nn]   [\v!tuesday=tysdag]
\setuplabeltext [\s!nn] [\v!wednesday=onsdag]
\setuplabeltext [\s!nn]  [\v!thursday=torsdag]
\setuplabeltext [\s!nn]    [\v!friday=fredag]
\setuplabeltext [\s!nn]  [\v!saturday=laurdag]

\setuplabeltext [\s!nb]    [\v!page=side ]
\setuplabeltext [\s!nb]  [\v!atpage=p\aring\ side ]
\setuplabeltext [\s!nb] [\v!hencefore=som vist over]
\setuplabeltext [\s!nb] [\v!hereafter=som vist under]
\setuplabeltext [\s!nb]       [\v!see=se ]

\setuplabeltext [\s!nn]    [\v!page=side ]
\setuplabeltext [\s!nn]  [\v!atpage=p\aring\ side ]
\setuplabeltext [\s!nn] [\v!hencefore=som vist over]
\setuplabeltext [\s!nn] [\v!hereafter=som vist under]
\setuplabeltext [\s!nn]       [\v!see=sj\aring\ ]

\setuplabeltext [\s!nb] [\v!january  :\s!mnem=jan.]
\setuplabeltext [\s!nb] [\v!february :\s!mnem=feb.]
\setuplabeltext [\s!nb] [\v!march    :\s!mnem=mars]
\setuplabeltext [\s!nb] [\v!april    :\s!mnem=april]
\setuplabeltext [\s!nb] [\v!may      :\s!mnem=mai]
\setuplabeltext [\s!nb] [\v!june     :\s!mnem=juni]
\setuplabeltext [\s!nb] [\v!july     :\s!mnem=juli]
\setuplabeltext [\s!nb] [\v!august   :\s!mnem=aug.]
\setuplabeltext [\s!nb] [\v!september:\s!mnem=sep.]
\setuplabeltext [\s!nb] [\v!october  :\s!mnem=okt.]
\setuplabeltext [\s!nb] [\v!november :\s!mnem=nov.]
\setuplabeltext [\s!nb] [\v!december :\s!mnem=des.]

\setuplabeltext [\s!nn] [\v!january  :\s!mnem=jan.]
\setuplabeltext [\s!nn] [\v!february :\s!mnem=feb.]
\setuplabeltext [\s!nn] [\v!march    :\s!mnem=mars]
\setuplabeltext [\s!nn] [\v!april    :\s!mnem=april]
\setuplabeltext [\s!nn] [\v!may      :\s!mnem=mai]
\setuplabeltext [\s!nn] [\v!june     :\s!mnem=juni]
\setuplabeltext [\s!nn] [\v!july     :\s!mnem=juli]
\setuplabeltext [\s!nn] [\v!august   :\s!mnem=aug.]
\setuplabeltext [\s!nn] [\v!september:\s!mnem=sep.]
\setuplabeltext [\s!nn] [\v!october  :\s!mnem=okt.]
\setuplabeltext [\s!nn] [\v!november :\s!mnem=nov.]
\setuplabeltext [\s!nn] [\v!december :\s!mnem=des.]

Feel free to contact me with any questions or comments. :)

Karl Ove Hufthammer
E-mail and Jabber: karl at huftis.org

More information about the dev-context mailing list