# Spell out Volume and Edition # in words - Biblatex in German?

Is it possible to make Biblatex output the word "Second" (in German) instead of the number 2?

For example here is my preamble:

\usepackage[utf8]{inputenc}
\usepackage[
sorting=none,
backend=biber,
babel=other]{biblatex}
\usepackage{csquotes}
\usepackage[german,american]{babel}


and here is my bibliography entry:

@book{Cantor,
author="Cantor, Moritz.",
title="Vorlesungen über Geschichte der Mathematik.  (von 1200 - 1668).",
language={German},
volume={2},
edition={2},
publisher="Druck und Verlag von B.G. Teubner",
date={1900},
pagetotal="XII + 943 S.",
hyphenation={ngerman},
note="(in Germ.)",
}


However, when I run Babel+Biblatex on it, it outputs:

Moritz. Cantor. Vorlesungen uber Geschichte der Mathematik. (von 1200 - 1668).
German. 2. Aufl. Bd. 2. (in Germ.) Leipzig: Druck und Verlag von B.G. Teubner,
1900. XII + 943 S.


Whereis I want it to output "Zweite Auflage" and "Zweiter Band" instead of "2.Aufl." and "Bd. 2".

Does anyone know if this is this possible with biblatex?

-

You could use the fmtcount package for that purpose and redefine the field formats accordingly. For the edition, you can just redefine the \mkbibordedition macro. It is best to do this inside \DefineBibliographyExtras, since this is a language specific string:

\DefineBibliographyExtras{ngerman}{%
\renewcommand*{\mkbibordedition}[1]{\Ordinalstringnum{#1}[f]}
}


For this to work, you need a bugfix for the current fmtcount version (the author of the package knows about this bug). See the minimal example below.

The volume is somewhat different, since the original definition (taken from biblatex.def) is

\DeclareFieldFormat{volume}{\bibstring{volume}~#1}% volume of a book


We need an auxiliary macro to have the integer transformed into an ordinal number, e.g. \mkbibordvolume, which we can then use in the “volume” field format:

\newcommand*{\mkbibordvolume}[1]{\Ordinalstringnum{#1}[m]}


Again, this is language specific, so the best would be to handle this as with \mkbibordedition. Thus, all in all, you get:

\newcommand*{\mkbibordvolume}{}
\usepackage{fmtcount}
\DefineBibliographyExtras{ngerman}{%
\renewcommand*{\mkbibordedition}[1]{\Ordinalstringnum{#1}[f]}
\renewcommand*{\mkbibordvolume}[1]{\Ordinalstringnum{#1}[m]}
}
\DeclareFieldFormat{volume}{\mkbibordvolume{#1}~\bibstring{volume}}


If you want to have “Band” instead of “Bd.” and “Auflage” instead of “Aufl.”, just use the option abbreviate=false (as in the example below). If you want everything else to be abbreviated, but not these two strings, use \DefineBibliographyStrings (see the manual for details).

\documentclass[german,ngerman]{scrartcl}
\listfiles
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{Cantor,
author={Cantor, Moritz},
title={Vorlesungen über Geschichte der Mathematik (von 1200--1668)},
language={german},
volume={2},
edition={2},
publisher={Teubner},
date={1900},
hyphenation={german}
}
\end{filecontents}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel,csquotes}

\usepackage[
sorting=none,
backend=biber,
babel=other,
abbreviate=false
]{biblatex}

\newcommand*{\mkbibordvolume}{}

\usepackage{fmtcount}
\DefineBibliographyExtras{ngerman}{%
\renewcommand*{\mkbibordedition}[1]{\Ordinalstringnum{#1}[f]}
\renewcommand*{\mkbibordvolume}[1]{\Ordinalstringnum{#1}[m]}
}

\DeclareFieldFormat{volume}{\mkbibordvolume{#1}~\bibstring{volume}}

% Bugfix für fmtcount:
\makeatletter
\DeclareRobustCommand{\@OrdinalstringMgerman}[2]{%
\@ordinalstringMgerman{#1}{\@@num@str}%
\protected@edef#2{\protect\MakeUppercase\@@num@str}%
}
\DeclareRobustCommand{\@OrdinalstringFgerman}[2]{%
\@ordinalstringFgerman{#1}{\@@num@str}%
\protected@edef#2{\protect\MakeUppercase\@@num@str}%
}
\DeclareRobustCommand{\@OrdinalstringNgerman}[2]{%
\@ordinalstringNgerman{#1}{\@@num@str}%
\protected@edef#2{\protect\MakeUppercase\@@num@str}%
}
\makeatother

\begin{document}
\cite{Cantor}

\printbibliography
\end{document}

-
Actually, redefining the auxiliary macros inside \DefineBibliographyExtras is not always necessary, since fmtcount itself is aware of the different languages (it supports only English, Spanish, Portuguese, French, French (Swiss), French (Belgian), German and Italian, though). –  domwass Apr 27 '11 at 8:58
Sorry, will this change only the german numbers, or other languages too? –  drozzy Apr 27 '11 at 12:51
@drozzy: See my comment above (c; –  domwass Apr 27 '11 at 13:15
Hm.. I mean is it possible to restrict this only to German language? Sorry for stupid question - I am still trying to understand all those commands!! –  drozzy Apr 27 '11 at 15:07
@drozzy, I don’t know if it is possible to limit this behaviour to one language. But I would not recommend to try this, since it is inconsistent. –  domwass Apr 27 '11 at 15:25