add support for text language

Change-Id: I4e184195c3e54d54a6627aec110fc63d250fb211
use typedef for property map

Change-Id: Ia29e9fa6084696105783fa09f92738f2c5349496
eliminate some copypasta

Change-Id: I295b98876b19d514d114d115ef8ce8e7ce00d6d1
set writing mode from document default

Change-Id: Ia04d00310cb73d6af6bb19cb21c4ec52011d5969