Add support for lang tags.

- Added lang tag tests.
- This isn't done in the best way possible. I think the code is in
need of a refactor.
Merge pull request #402 from RickEyre/lang-tag

Add support for lang tags.