function translateAttribute(elemSelector, attr, key) {
  jQuery(elemSelector).attr(attr, translateKey(key));
}
Translates an attribute of a given element.
This can e. g. be useful for translating tooltips
@param elemSelector {string} jQuery selector like ".class" of "#id"
@param attr {string} attribute to set, e. g. the title attribute
@param key {string} key of the string to translate