Mastodon has an automatic language detector.
If you start writing a post on the website interface, the post language indicator will light up if it thinks you have the wrong setting. When you click on the lit-up indicator it will suggest which setting you should use instead.
The reason it doesn't set language automatically is because the detector is too unreliable for short posts (and Mastodon is by its nature full of short posts).
More info on language settings at https://fedi.tips/setting-your-language-preferences-on-mastodon-and-filtering-out-posts-in-other-languages

Setting your language preferences on Mastodon, filtering out posts in other languages, filtering search results by language | Fedi.Tips – An Unofficial Guide to Mastodon and the Fediverse
An unofficial guide to using Mastodon and the Fediverse
fedi.tips
Link author:
Fedi.Tips@FediTips@social.growyourown.services