For several reasons, I am working on a source file that should be compilable by either xelatex or lualatex. I would like British hyphenation for the text and am using csquotes and biblatex with british options.
On the XeTeX mailing list two things were mentioned:
(a) Use polyglossia, not babel with xelatex;
(b) polyglossia is incompatible with lualatex at present; use babel instead.
I show below a sample file with my question and my present setup.
\documentclass[12pt,a4paper]{memoir}
%
\usepackage{fontspec}
\setmainfont{Minion Pro}
\setsansfont{Myriad Pro}
%
% We want to compile with either xelatex or lualatex
% The former requires polyglossia for british hyphenation
% The latter requires bable for british hyphenation
%
% Ideally something like (unsure if this is correct)
%
% \ifxetex
% \usepackage{polyglossia}
% \setmainlanguage[variant=british]{english}
%
% \ifluatex
% usepackage[british]{babel}
%
% should work but I do not know the correct syntax for it.
%
% My workaround is:
%
\makeatletter
\language=\l@british
\makeatother
%
% which works but is inelegant in a *LaTeX source file.
%
\usepackage[backend=biber,babel=none,date=iso8601,urldate=iso8601,language=british,refsection=chapter,sorting=none,style=numeric-comp,hyperref=auto]{biblatex}
\usepackage[english=british]{csquotes}
\begin{document}
Try some hyphenation, some \enquote{quotations}, and some references to see if everything works.
\end{document}
Any suggestions to make hyphenation and other language features like date work consistently across both xelatex and lualatex is most welcome.
