Translator service in sequoyah plugin of Eclipse

2019-08-31 08:53发布

问题:

I have installed sequoyah plugin in eclipse. I am using its editor to translate my strings.xml file in Android project. Now when I right click the column in sequoyah text editor and click on 'translate column', I get the window which shows to select translator service, language to translate from and language to translate to. But I can not select any translator service as there is none in the list. So how can I install the translator service so that I can use in the way defined above?

回答1:

The only implementation I know is the one that comes with MOTODEV Studio for Android, using Google Translate API v2. Unfortunately, this is a paid service and requires you have a key for accessing the API, which you have to get from Google services.

The addition of new translators, though, is quite simple to do through Sequoyah. It consists of implementing one of their extension points (org.eclipse.sequoyah.localization.tools.translator) by providing a class that contains some methods that receive lists of strings to translate, do the actual translation by using a translating service of your choice, and return the results. Once you get your Eclipse running with this, you'll see it show up on the drop down list for choosing the translator service :)

Hope it helps!