# Quotes face the wrong way with xepersian and csquotes

When I try to use csquotes along with xepersian, the quotation marks come out facing the wrong way (for right-to-left text).

\documentclass{minimal}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\usepackage{csquotes}
\begin{document}
"این فقط یک آزمایش است"
\end{document}

• If you're going to write in Persian, please remember that the correct quotation mark in Persian is «...». :) Jul 13, 2018 at 15:42

There may be a more general solution, but I was able to solve this with a custom quotation style—just by reversing the left and right quotation marks.

\documentclass{minimal}
\usepackage{xepersian}
\settextfont{XB Niloofar}
\usepackage{csquotes}
\MakeOuterQuote{"}
\DeclareQuoteStyle{farsi}
{\textquotedblright}{\textquotedblleft}
{\textquotedblleft}{\textquotedblleft}
\setquotestyle{farsi}
\begin{document}
"این فقط یک آزمایش است"
\end{document}