[Tex/LaTex] Localize terms in bibtex/biblatex entries

biblatexlanguages

Is there a way I could localize terms in my bibtex entries?

example:

note = {to appear}

I use a bibtex file for articles in english and german and it would be nice to replace the "to appear" in the bibliography with a localized string.

Best Answer

biblatex provides a pubstate field for publication states, so I suggest to use this field instead of the note field. For localized strings, use the \bibstring macro. See section 4.8 of the manual for details about \bibstring and section 4.9.2.11 for the publication states defined by default. If you really nead an additional toappear state, here's how to do it:

\documentclass{article}

\usepackage[ngerman]{babel}

\usepackage{biblatex}

\NewBibliographyString{toappear}
\DefineBibliographyStrings{english}{%
  toappear = {to appear},
}
\DefineBibliographyStrings{ngerman}{%
  toappear = {im Erscheinen},
}

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
  pubstate = {\bibstring{toappear}},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
  pubstate = {\bibstring{inpress}},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\nocite{*}

\begin{document}

\printbibliography

\end{document}
Related Question