Set the dir and the lang of the link

The link titles are in different languages and they need
to be shown with appropriate dir and lang attributes.

This is repeated, so the attributes settings is now in
one function.

Change-Id: I91be8fb97020cf5cdb24a5ab652f3f2fa3ace272
Merge "Set the dir and the lang of the link"