If you use Google's iOS keyboard Gboard, you can now translate to and from all languages supported by Google Translate -- that's currently 103. This means you can effectively type and translate in any supported language, in any app on your iPhone. The feature is a welcome addition, but it's a bit overdue. Gboard has supported translation on Android since 2017.
The feature is available with Gboard version 1.42 and iPhones and iPads with iOS 9 and up. As you type, you'll find the translation in the suggestion strip or by pressing the Google button. The app automatically detects the language you're typing in and lets you then select which language you want to translate to. You'll also be able to paste text and translate it to or from any supported language.
In addition to the translation feature, Gboard has language support for 685 languages. To help people communicate in their first language, Gboard offers keyboard layouts tuned for each language, as well as autocorrect and predictive text features. Google has been steadily adding languages to Google Translate, and we can expect the feature to continue to grow on iOS.