improve i18n preload to take advantage of partially flattened locales, fixes #17155

(cherry picked from commit 341e41f1797739449d883e8951cda54bde53417e)