How to obtain the current language set by \setotherlanguage{english} ?
\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{czech}
\begin{document}
\ifthenelse{\equal{\xpg@other@language}{czech}}{A}{B} %macro doesn't exist
\setotherlanguage{english}
\ifthenelse{\equal{\xpg@other@language}{czech}}{A}{B}
\end{document}
I want output like AB. But macro \xpg@other@language does not exist and documentation is very poor. \xpg@main@language returns czech as I expected.

englishjust before\end{document}? I'm trying to distinguish between languages in my own-written macros. Of course you are right with\makeatletterandifthenelsebut this mess doesn't change a meaning. – Luuuucky Feb 20 '16 at 13:46