It should be fairly easy to train a small model to detect languages, not sure if there is one already but seems a bit overkill.
I have used this library in the past to detect language: https://pypi.org/project/langdetect 216, it should be more than enough as a pre-processing step to then choose which translation model to use (if that is the use case you were referring to)