language detection pattern