2

I am using biblatex (with biber) and setting the language field in entries in my .bib file. Oddly, the language is not interpreted as a localisation key, as it apparently ought to be. (I am using polyglossia for language support and localisation.)

I get output like the following.

Hume, D., 1777. An enquiry concerning human understanding. british.

(The above presumes I set language = {british}. If I set language = {en-GB}, then the corresponding text appears instead in the output document.)

Am I missing something here?

As a side point, I would be grateful if anyone can recommend how to not print the language in the bibliography as long as it is one of the document languages (i.e., the one of the "default" or "other" languages).

Minimum reproducible example

\begin{filecontents*}[overwrite]{\jobname.bib}
@book{author00,
    title = {{A Title}},
    publisher = {Alpha},
    year = {2008},
    editor = {Author, A},
    address = {London},
    language = {english},
}
@book{buthor00,
    title = {{B Title}},
    publisher = {Bravo},
    year = {1990},
    author = {Buthor, B},
    address = {New York},
    language = {english},
}
\end{filecontents*}

\documentclass{article}

\usepackage{polyglossia} \usepackage[backend = biber]{biblatex}

\addbibresource{\jobname.bib}

\begin{document}

\citeauthor{author00} has written \textcite{author00}.
\citeauthor{buthor00} has written \textcite{buthor00}.

\nocite{*}
\printbibliography

\end{document}

Noldorin
  • 890

1 Answers1

1

Here's the solution I ended up with, after some kind advice from @UlrikeFischer on the chat here.

The main issue was that I was doing \setdefaultlanguage{british} but not \setmainlanguage{british}, so localisation was not taking effect. Silly me!

% Do not mention language of an entry if it is in the same or another variety of English.
% Copied from `tex/latex/biblatex/lbx/english.lbx` in the biblatex package, and adjusted accordingly.
% This solves the "side point" in my question.
\DeclareRedundantLanguages{british}{english,american,british,canadian,australian,newzealand,USenglish,UKenglish}

% Define localisation strings for the 'british' language. % This is just an example, since due to the above "redundant languages" setting, this is superfluous, though it would not be if you did, e.g., \DefineBibliographyStrings{spanish}{...}. \NewBibliographyString{langbritish} \NewBibliographyString{frombritish} \DefineBibliographyStrings{english}{ langbritish = {British}, frombritish = {from the British}, }

Noldorin
  • 890