Android Translate API

1.4k Views Asked by At

I'm developing an Android translation app and I've been searching a translation API with the capacity of language packages download to use the app offline but I'm not able to find something similar. I've found two open source API, MyMemory and Apertium but I don't know how can I use them offline. Any ideas? Thank you

2

There are 2 best solutions below

3
Remy On

Translating is a very complex problem. There are no good offline translation engines that would work well on a Android phone.
MyMemory is just a translation memory, e.g. it stores millions of existing translation, but this will not help much with your app. Apertium is also an online service.

There are great translation apps from Microsoft and Google. I would try to build something different.

0
unhammer On

Apertium is completely free and open source, including the language data, and it should be possible to run all the language pairs offline on a phone. In practice, some of the "newer" language pairs might require a bit of work since they have dependencies on C++ programs that haven't been ported to Android yet (cg-proc from the vislcg3 package and hfst-proc from the HFST package).

Still, quite a lot of the work has been done already, and there's an "example" app you can build on – http://wiki.apertium.org/wiki/Apertium_Android explains it:

The goal of the 'official' Apertium Android app is to provide example code on how to integrate Apertium offline translation into an Android app.

It requires internet permission to enable users to download language pairs (and developers to showcase their work from a phone).

You can of course make it not even require Internet permission by bundling the language pairs into the app.

(If you need some of the other language pairs and are interested in making cg-proc/hfst-proc work on Android, you should probably get in touch with the relevant maintainers.)