I would like to put the strings like "In" in french (so "Dans") in a APA bibliography with biblatex. I tried to use the answer of this post, it works until I put the biblatex style in apa : Replace "in" in specific entries biblatex . I also tried to with this answer but the problem is the same : Biblatex: add "submitted to" or "to appear in" for some publications .
Has somebody a solution to this problem, please ?
The main file :
\documentclass[french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
%\DeclareLanguageMapping{french}{french-apa}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily} % remove smallcaps
\addbibresource{sample.bib}
\input{string.tex}
\begin{document}
\cite{lopez2016-1}
\printbibliography
\end{document}
The string file (I can more or less understand what is wrote but I can't write that) :
\NewBibliographyString{toappearin}
\NewBibliographyString{submittedto}
\DefineBibliographyStrings{english}{%
toappearin = {to appear in},
submittedto = {submitted to},
}
\DefineBibliographyStrings{french}{%
toappearin = {Dans},
}
\renewbibmacro*{in:}{%
\ifboolexpr{not test {\iffieldundef{pubstate}}
and (test {\iffieldequalstr{pubstate}{toappearin}}
or test{\iffieldequalstr{pubstate}{submittedto}})}
{\printtext{%
\printfield{pubstate}\intitlepunct}%
\clearfield{pubstate}}
{\printtext{%
\bibstring{in}\intitlepunct}}}
The sample file :
@incollection{lopez2016-1,
author = {Lopez, G{\'e}rard and Bouasker, Anissa},
title = {Le psychotraumatisme},
pages = {4 - 28},
editor={Lopez, G{\'e}rard and Sabouraud-S{\'e}guin, Aurore},
series = {Les ateliers du praticien},
publisher = {Dunod},
isbn = {978-2-10-074590-6},
year = {2016},
booktitle = {Traiter les psychotraumatismes},
language = {fre},
address = {Paris},
keywords = {Traumatisme psychique -- Thérapeutique},
lccn = {978-2-10-074590-6},
pubstate = {toappearin},
}
Thank you for helping