String Translator Extension

I was wondering if anyone knew of some type of extension or something that translates

strings
for Swift. I know that you can localize
strings
by using a
Localizable.stings
file, but I get most of my strings from an API. So, I wouldn't be able to add the strings to the
Localizable.stings
file because the strings are not hard coded.


I'm looking for something where the code would translate the

string
like Google Translate, or something. Please tell me if you have found anything like this or if you have a solution.

Replies

I understand that API returns Strings (in some cases) and you want to translate those Strings.


Did you test cloud translation ?

You would pass it the String returned by API, with the original language (that you should know) and the destination language.


Have a look here:

h ttps://cloud.google.com/translate/docs/translating-text