Fix locales and loading the locales files (bug 1006620)