Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Usually a name stays the same in whatever language. So, whenever I quote a work by Knuth -- be it in an English article or a German one -- I will quote him as Donald E. Knuth.

This is not always the case with ancient or medieval names. They are spelled differently in different languages. Two examples in English | German | French:

  • Aristotle | Aristoteles | Aristote
  • Thomas Aquinas | Thomas von Aquin | Thomas d'Aquin

This means that when I write an English article, I need a bib-file that contains the English names, but when I want to write a German article, I need to go through my bib file and change the names accordingly. Depending on how often I in fact publish in English or German this could keep me busy and is prone to error.

So, I though, maybe I could have the different names already included in one single bib-file and let biblatex choose the correct name according to the primary language used in the document. Any ideas?

NB: I do not want to use in one single document both spellings Aristotle and Aristoteles (as the following MWE might make you think). Of course, if the article's primary language is English, then all the references to Aristotle will use the English spelling of his name. However, I want to be able to write articles in different languages, without (a) having to edit my bib-files each time or (b) generally maintaing not one single bib-file but two different ones, one for each language, or (c) having two distinct entries in one bib-file

MWE

% !TEX TS-program = lualatexmk
\documentclass{scrartcl}

\usepackage{fontspec}    
    \setmainfont[Ligatures=TeX]{Times New Roman}

\usepackage[ngerman, british]{babel}
\usepackage[babel]{csquotes}
\usepackage[style=verbose,abbreviate=false,backend=biber]{biblatex}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@book{aristotle:ross:1924,
    Author = {Aristotle},    % It is here, I think, that something could be done, e.g., ...
    Title = {Metaphysics},     % ... british=Aristotle,ngerman=Aristoteles,french=Aristote
    Editor = {William David Ross},
    Commentator = {William David Ross},
    Introduction = {William David Ross},
    Hyphenation = {british},
    Location = {Oxford},
    Publisher = {Clarendon Press},
    Volumes = {2},
    Year = {1924}}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\selectlanguage{british}
Some English text.\footcite{aristotle:ross:1924}

\selectlanguage{ngerman}
Etwas Text auf Deutsch.\footcite{aristotle:ross:1924}

\end{document}
share|improve this question

2 Answers 2

Here's a way:

\begin{filecontents}{\jobname.bib}
@book{aristotle:ross:1924,
    Author = {\Aristotle},    % It is here, I think, that something could be done, e.g., ...
    Title = {Metaphysics},     % ... british=Aristotle,ngerman=Aristoteles,french=Aristote
    Editor = {William David Ross},
    Commentator = {William David Ross},
    Introduction = {William David Ross},
    Hyphenation = {british},
    Location = {Oxford},
    Publisher = {Clarendon Press},
    Volumes = {2},
    Year = {1924}}
\end{filecontents}

\documentclass{scrartcl}

\usepackage{fontspec}    
\setmainfont[Ligatures=TeX]{Times New Roman}

\usepackage[ngerman,french,british]{babel}
\usepackage[babel]{csquotes}
\usepackage[style=verbose,abbreviate=false,backend=biber]{biblatex}
\addbibresource{\jobname.bib}


\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\newauthor}{mm}
 {
  \clint_newauthor:nn {#1} {#2}
 }
\tl_new:N \l__clint_author_tl
\cs_new_protected:Npn \clint_newauthor:nn #1 #2
 {
  \prop_new:c { g_clint_author_#1_prop }
  \tl_set:Nn \l__clint_author_tl { #1 }
  \keys_set:nn { clint-author } { #2 }
  \cs_new:cpn { #1 } { \prop_get:cV { g_clint_author_#1_prop } \languagename }
 }
\cs_generate_variant:Nn \prop_get:Nn { cV }
\keys_define:nn { clint-author }
 {
  unknown .code:n = 
   \prop_gput:cVn { g_clint_author_ \l__clint_author_tl _prop }
                  \l_keys_key_tl
                  { #1 }
 }
\ExplSyntaxOff

\newauthor{Aristotle}{
 british=Aristotle,
 ngerman=Aristoteles,
 french=Aristote
}

\begin{document}

\selectlanguage{british}
Some English text.\footcite{aristotle:ross:1924}

\selectlanguage{ngerman}
Etwas Text auf Deutsch.\footcite{aristotle:ross:1924}

\selectlanguage{french}
Du texte en Français.\footcite{aristotle:ross:1924}

\end{document}

You define a control sequence with

\newauthor{Aristotle}{
 british=Aristotle,
 ngerman=Aristoteles,
 french=Aristote
}

The command will be called \Aristotle (but the string is arbitrary). The command should be used in the .bib file. Maybe it's possible to use biblatex methods for processing the author name without changing it.

enter image description here

share|improve this answer

This isn't really an "answer" per se. However. This is planned for biblatex 3.0/biber 2.0. You will (hopefully) be able to define alternatives like this:

AUTHOR = {Aristotle},
AUTHOR_translated_ngerman = {Aristoteles},
AUTHOR_translated_french = {Aristote}

and then pick these out within the style as:

\printname{author}
\printname[form=translated,lang=ngerman]{author}
\printname[form=translated,lang=french]{author}

probably switched using \selectlanguage as @egreg shows.

This sort of (optional, for backwards compatibility) form/lang interface is planned for any macros dealing with fields, list or names. Work is underway, the biber part is already done, the biblatex part is underway but is quite some work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.