added setLocaleFromPath function