browser locale manipulation outside loop