Tapping into the Apple Translate app

Hey guys,

I saw that both the Mona (Mastodon client) and the Telegram app offer translations on post through the click of a button. They both offer to select "Apple Translate" as a translation service. Both apps are available through the App Store.

I'm wondering how they're doing it :) I couldn't find an official, public API to tap into the LTUITranslationViewController they're presenting. On the other hand they've both run through the app review process and using private APIs should have thrown a red flag. I thought that they may have setup a custom shortcut through which they trigger the Apple Translate app, but there are no shortcuts by these apps in the Shortcuts app.

This is what shows up when you hit the "Translate" button on a post:

Tapping into the Apple Translate app
 
 
Q