public final class HtmlAssetTranslator
extends java.lang.Object
A utility which auto-translates the English-language text in a directory of HTML documents using Google Translate.
Pass the Android client assets/ directory as first argument, and the language to translate to second.
Specify "all" for language to try to translate for all existing translations.
Optionally, you can specify the files to translate individually.
Usage: HtmlAssetTranslator android/assets/ es [file1.html file2.html ...]
This will translate .html files in subdirectory html-en to directory html-es, for example.
Note that only text nodes in the HTML document are translated. Any text that is a child of a node
with class="notranslate"
will not be translated. It will also add a note at the end of
the translated page that indicates it was automatically translated.
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |