add code to resolve locale at preload time. fixes #17155, refs #17155