only set locale if provided