I need to figure out the best way to convert locale strings to a human-friendly name. I could write a large <xsl:choose>
and just add a condition for each of the locales I want to convert, but I think there is probably a more efficient or clever way.
My input looks like this:
<content name="locale" value="en_US" />
<content name="locale" value="ja_JP" />
And corresponding output might look like this:
<content name="language" value="English" />
<content name="language" value="Japanese" />
In my case I don't care about the country right now, only the language. I also don't have to check all possible locales, only 10 or so currently, but there may be more in the future which is why I'm looking for the least rigid way of processing the conversion.