Add dir and lang attribs and autonym class

Change-Id: I517bf163f639b480f97e61265de4ec2e23245582