add locale option and refactor tests