Tidied locale parsing