Rewrite locale and pattern loading mechanism. Makes loading locales easier. Rename setFormat to pattern.