Adjust API to handle localized names (bug 1071820)

yeah, that code hurts my brain. I don't really want to touch it. But maybe I'll try.