change the way to load locales in js