fixes #2 - added function to translate attributes of elements

fixes #2 - Now you can translate an attribute of an element (e.g. the
title).