csquote
's \foreignquote{<inner lang>}{<quote>}
command switch to <inner lang>
before enquoting, so as a result, the enclosing quotes are those configured for <inner lang>
. E.g. in an document in english, \foreignquote{french}{bonjour \enquote{salut}}
gives « bonjour « salut » ».
Is there a way to do the opposite, i.e. using the outer language quotes but still switch the language inside to get “bonjour « salut »”? I have tried defining
\NewDocumentCommand\quoteforeign{m m}{\enquote{\textlang{#1}{#2}}}
(using polyglossia
lang switching) but it inserts an unwanted space between the opening quote and the text. I suppose that there is a way to simply fix the command to get rid of the space, but I'd rather have a more idiomatic fix.
MCE
\documentclass[a4paper, 12pt]{article}
\usepackage{xparse}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{french}
\usepackage[autostyle=true]{csquotes}
\NewDocumentCommand\quoteforeign{m m}{\enquote{\textlang{#1}{#2}}}
\begin{document}
This \enquote{is} a test or as they say in french an \foreignquote{french}{essai or \enquote{preuve de concept}}.
This \enquote{is} a test or as they say in french an \quoteforeign{french}{essai or \enquote{preuve de concept}}.
\end{document}