created loadLocale method