Detect right-to-left languages and set text direction accordingly.

Solves issue #34.