It would be nice if, for example, on iOS devices in settings such as Mona for mastodon, we could choose if we want to translate through Google translator or, for example, Apple’s own translator, leaving a window that directly translates things for you instead of opening a window to your browser redirecting to Google translator.
An example:
On android you can simply long click, then select translate and a popup opens with the translation (depending on the translator app ofc)
I’m assuming Google needs to provide an API for that for iOS.
Not if you use the native translation in iOS. Google has nothing to do with that.
Google provides APIs for developers who don’t want to use native iOS features; for example a developer can use Google maps API over the Apple Maps API. They have the ability to provide a Google translate API for iOS but don’t.