polyglossia: add automatic detection of languages