condition for setLocale fixed