Android String Resource XSL

I recently had a translator volunteer some time to translate one of my apps using MS Word on the strings.xml file. What I did not realize was that MS has a funny way of displaying XML files. MS Word will not display attributes by default, which means the name attribute is all but hidden from view. So instead of seeing the string:name attribute along with the string value that needs to be translated, all my volunteer could see was the string value. The name of the string could shed light on how that string was used in the app, so finding a way to present that information to my translator was a priority.

MS Word did not come with a way to view XML files “in the raw”, it relies instead on XSL translations to view XML files. I created my own XSL translation of the standard Android XML strings resource file so that it would display the Name attribute as well as the string value so that translations could benefit from contextual program reference as well as the string values themselves. Of course, this assumes a fairly verbose name was used for the string so that context could be determined. =)

In case any other developers are interested, I posted my XSL file so anyone can use it and benefit from better translations of their apps.
Download link: android_string_resources.xsl

Leave a Reply

Your email address will not be published. Required fields are marked *