parsing and rendering locale strings