%\enabletrackers[publications.setups]

\setuplanguage[ru]
\setupbodyfont[dejavu]
\mainlanguage[russian]
\setupindenting[big,yes]
\setbreakpoints[compound]

\startbuffer[bib]

@Book{Declercq:2000,
  author      = {Declercq, Georges},
  title       = {Anno Domini: The origins of the Christian era},
  address     = {Turnhout},
  publisher   = {Brill},
  year        = {2000},
  shorttitle  = {Anno Domini}, % ignored
  shorthand   = {Declercq},    % ignored
  language    = {english},
  hyphenation = {english},     % ignored
  pagetotal   = {206},         % ignored
  pages       = {206},
}

\stopbuffer

\usebtxdataset[bib.buffer]
\usebtxdefinitions[apa]

\setupbtx[apa:cite:authoryear][left={[},right={]}]

\startsetups btx:apa:list:book
  \btxdoif {author} {
      \btxflush{author}
      \btxcomma
  }
  \btxdoifelse {title}
      {\btxflush{title}\btxperiod}
      {No Title}
  \btxdoif {address}
      {\btxspace\emdash\btxspace\btxflush{address}\btxcomma}
  \btxdoif {publisher}
      {\btxspace\btxflush{publisher}\btxcomma}
  \btxdoif {year}
      {\btxspace \btxflush{year} \btxperiod}
  \removeunwantedspaces
\stopsetups

\starttext

\startbodymatter

Test.\cite[Declercq:2000]

\stopbodymatter

\startbackmatter
\startchapter[title=Bibliography]
\placelistofpublications[criterium=all,sorttype=authoryear]
\stopchapter
\stopbackmatter

\stoptext
