Must detect language before loading config. Should fix #3763 broken by #3750 .