I\'m faced with a situation where I\'m reading a string of text and I need to detect the language code (en, de, fr, es, etc).
Is there a simple way to do this in py
If you only have a limited number of possible languages, you could use a set of dictionaries (possibly only including the most common words) of each language and then check the words in your input against the dictionaries.