Setting Android Keyboard language via code

We are developing a game that’s focused on learning languages. As in Duolingo, for instance, what we want is to change the language on the keyboard via code. The expected behaviour would be that the player just touches on an input field, and the correct keyboard language is shown directly to the user. The idea is to access the current keyboard and ask for a language subtype if it has one. Gboard has that function, and it runs on most android devices, and we can always ask the user to download/use it. I know how to create libraries in AndroidStudio and importing to the project, but I have found no workarounds to hard-changing the keyboard language. If anyone can provide a solution, or at least say “this works for modern API, delve into it” it would be MUCH appreciated!

  • Handling locales inside Unity proves not useful at all since you can’t hard-set a keyboard language at all.
  • Tried handling locales directly from Android, but couldn’t find a good way to do that at modern API levels.
  • Tried working around with the Input System Manager and couldn’t do much either.

I would be also very interested in learning about this. Can anybody please shed some light on this topic? How do things look on the iOS side would be something great to know as well.
Thank you!