robust language detection