Hello @mc ,
There is no simple built-in solution in .NET or common libraries that can accurately detect multiple languages within a single text input like your example string. The main challenge is that your mixed text contains segments from different languages that need to be separated before detection can work effectively.
You could consider looking into advanced NLP libraries or services that specialize in language detection.
Azure Cognitive Services Text Analytics offers the most reliable language detection feature for this type of mixed content, though it is a commercial service.
For free alternatives, ML.NET allows you to integrate custom machine learning models which could be trained for multi-language detection, but this would require significant effort and expertise in machine learning.
Also, the LanguageDetection library might help to some extent but may not be perfect for mixed-language inputs since it's designed for single-language detection and hasn't been updated recently.
I hope this clarifies the situation and gives you a clearer path forward.