fix a bad variable name
add a  global variable, remove some duplicate code related to spanish locale