Hey,
I’m wondering if it’s possible to use the Translation service by Apple when selecting text like it’s possible in safari or other apps developed by apple. For example in notes or others you can select text and hit the translate button, which shows the translation to the systems language as far as I know. My question now is if it is possible to also provide this feature in my own app. To be more specific, having a selectable text view , then being able to translate this wording and maybe even get the results not only shown to the user himself but returning the translation to my own app for further processes …
as far as I know, the standard dictionary entries are provided by Oxford or in Germany by Duden api services. Is it even possible to the app to choose which service to use and another question: is it possible to customize the options popping up when text is selected? (The view where also “copy”,”paste”,”cut”…. Is shown -> extend options with “translate”?
Many thanks for your help. Unfortunately, I haven’t found an answer to those questions. My only thought has been to use external api by Oxford etc but first I would like to be in knowledge of the possibility or unavailability of the given service already implemented by apple to iOS and macOS devices.
Have a great day. À bientôt
I just searched a little more through the World Wide Web and found some first interesting resources that may fit my initial „needs / demands“
Official Apple Doc uireferencelibraryviewcontroller
There are also brief tutorials out there, which show how to use this functionality of UIkit. (Since I’m relatively new to swiftui and apples developer scene I didn’t know that sharing a specific url is not supported, but there are some tutorials introducing uireferencelibraryviewcontroller).