SwiftKey (Android keyboard) does an amazing job of this.  I routinely switch between French and English, and usually by the end of the first word in the other language my autocorrect and suggestions are both in the right language.