adapted locale changes from rometools/rome-moudles#22