cleaned up and test some enforcedLang handling
#7405
+85
−19
Merged