Add lang code and direction to html element.