add script to change html language and direction for fop