The setLanguage call in the worker is what you want to call to switch languages. But you can't see the worker from keyboard.js, so I think you need to define a setLanguage() call on the input method so that it can send the setLanguage message to the worker.

I'm thinking now that you don't need to activate or deactivate the input method. If the new keyboard uses the same input method as the old one, then just call its setLanguage() method to change languages.  If they use different input methods, then there is nothing we can do because we don't have a valid state object.  (If we add other input methods in the future, we could add a getState() call so that we could get the current state from the old method and pass it to the new method)

The issue of having keyboards that support suggestions and builds in which there are no dictionaries for that language is a bug. 
Would you file a bug about that?