error and locale update for locale function