Auto detect language and direction. Fixes issue #5