Translator.detect not working properly

from googletrans import Translator

txt=‘Hola! Mi nombre es Chris Mattmann’

translator = Translator()
lang=translator.detect(txt)
print(lang)

Output
Detected(lang=en, confidence=1)

I can’t understand why the output is lang=en. My text is polish. Required output is lang=‘pl’

This is the wrong category to ask this question. You might want to try Users, although you’ll likely get a better answer in a Google Translate specific forum.