Implemented full support of "lang" option and added more tests