At the moment, it will not be possible to do this through scripts. (v 8.0.19 android + 7.5.14 Win)
I wrote to tech support, they promised to fix it in the next update, which is expected soon.
So far, I've come up with the idea to do this:
In the settings of the "keyboard shortcuts for entering languages" of Windows, a common keyboard shortcut for changing the language is set - Alt +Shift.
But you can also set additional combinations to enable each language individually. I have assigned Ctrl+9 for the first language, and Ctrl+ for the second8. In the application, in the gamepad, I created 2 buttons, for each combination by sequentially specifying the key through "QWERTY" (without scripts)