Test language detection