Added language detection