save locale correctly