html10n.js: Don't break in getDirection if language hasn't been set

fixes #1724