An open API service indexing awesome lists of open source software.

https://github.com/dhowe/ritranslate

A translation API for RiTa
https://github.com/dhowe/ritranslate

Last synced: about 1 year ago
JSON representation

A translation API for RiTa

Awesome Lists containing this project

README

          

## RiTranslate: open-source translation for computational writing

npm version

A set of new translation features for the RiTa toolkit, allowing users to do programmatic, real-time translation from within RiTa-based works.

[javadocs]

### With Processing

1. If needed, download and install [Processing](https://processing.org/download/?processing).
2. Download and unzip [RiTranslate.zip](https://github.com/dhowe/RiTranslate/raw/master/RiTranslate.zip) to the "libraries" folder inside your Processing sketchbook (detailed instructions [here](https://github.com/dhowe/RiTranslate/blob/master/install_instructions.txt)).
3. Restart Processing, then create a test sketch as follows:
```processing
import rita.translate.*;

void setup() {

GoogleTranslate googleTranslate = new GoogleTranslate();

// language code reference: http://www.w3schools.com/tags/ref_language_codes.asp
String translation = googleTranslate.translate("cat", "en", "zh-Hant");

fill(0);
textAlign(CENTER);
text(translation, width/2, height/2);
}
```

### With Eclipse and Maven

1. Download and install [Eclipse](https://eclipse.org/downloads/)
2. Import RiTranslate, in Eclipse File > Import.. > Git > Projects from Git > Clone URI > URI : https://github.com/dhowe/RiTranslate.git
3. Note: depending on your language, you may need to set your Eclipse editor to use the UTF8 character set: Window > Preferences > General > Workspace :: Text file encoding
4. To run the tests, navigate to src/test/java/GoogleTranslateTest.java in the package-explorer, then right-click and select Run As > JUnit Test


---

Sponsored in part by a [Teaching Development Grant](http://www.cityu.edu.hk/edge/grant/tdg/) from the City University of Hong Kong.