using new API of Sprint 21 for checking the language of the document