I definitely don't understand what is happening here: (now as a complete example).
\documentclass {scrbook}
\def\DocLng{english} % centralised location for customisation
\def\DocLngVar{british}
\usepackage {polyglossia}
\setdefaultlanguage[variant=\DocLngVar]{\DocLng}
\begin {document}
End of story.
\end {document}
This produces a warning: Package polyglossia warning: Unknown English variant 'british' on ...
What? It knows the variant is british, but does not know it?
Setting instead \setdefaultlanguage[variant=british]{\DocLng} does not produce a warning. Thus british is not equal to british?
By the way, I know I can use Babel; on the other hand I'd like to know what is wrong here. Thanks.
britishin the warning, because TeX will expand when issuing the warning. – egreg Feb 18 '22 at 16:21