I already found a lot of approaches for this but no working solution. Here\'s what I tried and didn\'t work.
(1) Simply calling primaryLanguage()
You can access the primaryLanguage from every textfield by accessing the textfields textInputMode like that:
textInputMode
var language = textfield.textInputMode?.primaryLanguage