full rewrite using type
avoid duplications
define all possible values as enumeration
list all official locales supported