Anyone tried the Translate service?

Hello,

I would like to translate some objects from the server response without storing it in a JSON file.

For example, i am receiving an object like this:

{
"name": ["Hello", "Hola", "Bon Jour"],
"description": ["This text is in English", "This text is in Spanish", "This text is in French"]
}

I would like to set the value of the string in my app depending on the language selected. How can i achieve this?

Thanks so much.

First I guess you have to improve your json because right now your doesn’t know which language is which language? You know what I mean? Something like

[{ “en”: {“name”:"Hello}}, {“es”: {“name”: “Hola”}}]

Then when it comes to how to handle that in your app, your question is a bit to open for me.

P.S.: In french “Bonjour” not “Bon Jour” :wink: