Incorrect language detection

When I type in the Marathi language, LibreOffice incorrectly identifies it as Hindi, because both languages use the Devanagari script. This can affect language-specific features such as spellchecking and hyphenation.

I suggest integrating a language identification model such as FastText. The model lid.176.ftz is lightweight (less than 1 MB), highly accurate and fast.

I am not sure about legal / copyright issues.

https://wiki.documentfoundation.org/Language/Support

LibreOffice does not “identify” any language. It uses only the data that is directly given to it: either using explicitly set language (in paragraph style / character properties), or, where supported, using information provided by operating system / DE (as “input language”; currently supported on Windows and Qt). And guessing language is a bad idea. It may suffice in Internet chats, but not in documents.