I created a Quotes App, using an API to call the quotes, using retrofit, and now I want the app to have the option of translating all to Portuguese, Spanish and English. I’m new at coding can someone please help me?, how can I do that?
(The language of my app is #Kotlin)
CodePudding user response:
Assuming you have no way of requesting different language versions of the quotes, your best bet is to use a third-party API to do the translation.
This might be more than you want to tackle, but Google does have an ML kit to provide text translation: Translate text with ML Kit on Android
I've never used it, but it doesn't seem too difficult for basic text translation to a few languages.
CodePudding user response:
That's not something that can be done directly. I guess the best approach to achieve that functionality would be using a second API for translating the result of the query from the first API.
Just Google "Translation API".