Update
Starting from biblatex v3.8 (2017-11-04) and biblatex-apa v7.5 (2017-11-05) an explicit \DeclareLanguageMapping is not needed any more. The mapping is automatically done for you with \DeclareLanguageMappingSuffix{-apa}.
Of course this can only work properly if biblatex-apa comes with an .lbx file for your language.
Update biblatex, Biber and biblatex-apa to their newest versions if you experience problems with an undefined \mkbibdateapalongextra. The old version of this answer is left below in case you are stuck with an old version of biblatex or biblatex-apa.
Old answer
If you use biblatex-apa you will need a language mapping for each used language (at least the main language) to its -apa counterpart
\DeclareLanguageMapping{american}{american-apa}
if your document is american. See also problems using apa6e with biblatex-apa.
This is pointed out in the biblatex-apa documentation, § 3
Specify the style in the usual way when loading biblatex. If you are
using babel:
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
Refer to section 3.2 Localisation for a few more hints.
That means for each language you load with babel or polyglossia (but there things are a bit more complicated), you will need a mapping.
You will also have to provide a language mapping if you don't load babel at all. In that case the default language is English and you need \DeclareLanguageMapping{english}{english-apa}.
Whenever you declare a language mapping, biblatex uses the new file (in our case british-apa.lbx) if need be, that is if the mapped language is requested (in our case english).
british-apa.lbx contains some additional "BibliographyExtras" declared by \DefineBibliographyExtras{british}. These extras are only available for the exact language they are specified for (here british).
So even though we have forced biblatex to load british-apa.lbx instead of english.lbx we cannot use the "BibliographyExtras" since our document requests them for english only, but they are only available for british.
The relevant part of the documentation, § 4.11.8 Custom Localization Modules, p. 232 states:
Note that \DeclareLanguageMapping is not intended to handle language
variants (e.g., AmericanEnglish vs. BritishEnglish) or babel
language aliases (e.g., USenglish vs. american). For example, babel
offers the USenglish option which is similar to american. Therefore,
biblatex ships with an USenglish.lbx file which simply inherits all
data from american.lbx (which in turn gets the ‘strings’ from english.lbx). In other words, the mapping of language variants and babel
language aliases happens on the file level, the point being that
biblatex's language support can be extended simply by adding
additional lbx files.
The simplest solution would be to use british or american instead of the "generic" english.
The following MWE works on my machine.
\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber,date=short,maxcitenames=2,style=apa]{biblatex}
\DeclareLanguageMapping{british}{british-apa}
\addbibresource{\jobname.bib}
\begin{filecontents}{\jobname.bib}
@Manual{R-base,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Development Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2008},
isbn = {3-900051-07-0},
url = {http://www.R-project.org},
}
\end{filecontents}
\begin{document}
\cite{R-base}
\nocite{*}
\printbibliography
\end{document}
If you do not want to switch to a language other than english, you can go with the fix suggested in Polyglossia and biblatex-apa.
Copy british-apa.lbx to a place LaTeX can find it, rename it to english-apa.lbx and replace all occurrences of british with english (the most important of which is \DefineBibliographyExtras{british} which becomes \DefineBibliographyExtras{english})
\DeclareLanguageMapping{english}{american-apa}afterbabelandbiblatex? Do you load the languageenglishoramericaninbabel? – moewe Sep 17 '13 at 07:49Is there anything I should look for in the .log file?
– Rolf Marvin Bøe Lindgren Sep 17 '13 at 15:10roffe.styand can't guess what it contains. – egreg Sep 18 '13 at 14:05Just remove it.
Remove the line with Papers2.bib as well.
R.bib can just contain (http://pastebin.com/XT5FMs53)
– Rolf Marvin Bøe Lindgren Sep 18 '13 at 18:51polyglossiainstead ofbabel, the accepted answer there addresses what @moewe mentioned in the answer below. – henrique Sep 18 '13 at 19:17