OpenOffice/LibreOffice extension that translates whole documents or text selections, whilst retaining some formatting.

 * Iterates over paragraphs / text segments / and tables (only linebreaks kept)
 * Utilizes Google translate (or DeepL, Microsoft Translate, MyMemory).
 * And is therefore **rather slow**.
     <span style="background:yellow">(Writer freezes during process for long documents!)</span>
 * Still allows for text-selection mode translation (from [original

### Test/Install


<a style="width:120pt" class="button download green">pagetranslate.oxt<br><small style="color:red">(Linux-only

Download the package file, and import it in LibreOffice via Tools --> Extension Manager.<br>
<s>Or from LibreOffice extensions:

(downgrade in progress / currently broken)
Or from OpenOffice extensions: (full release, AOO/LO compatible)


### Usage

 * Hit the <kbd>T→🇬🇧</kbd> toolbar button to get entire document translated to English. Have some trust and patience for longer documents.
 * The second button <kbd>🏴</kbd> translates to the local/system language.
 * Or select a paragraph, to get a partial translation.
 * Alternatively pick a menu entry from <kbd>Extras</kbd> > <kbd>PageTranslate</kbd>.
 * The <kbd>→System lang</kbd> entry refers to your OpenOffice/Desktop setting.
 * Whereas <kbd>→ Paragraph locale</kbd> respects the text language as set in the Writer status bar.
 * Configure [options in

### Caveats

 * <s>Does not yet support anything but Writer documents. (Structure is entirely distinct for
 * The plugin is also likely to crash (won't affect Writer) when encountering complex documents (embedded drawings, Calc sheets, OLE elements, etc). It's only been tested with flow text and text tables.
 * Generally there's a log file in /tmp.
 * <s>Not sure if the toolbar icons work at all, or if that's a bug in the Linux version of LibreOffice.</s>
 * For direct content.xml translations, there's a inconvenient tool in off/. (Each office document .odt/.odc is a zip file. Extract the content.xml, apply the script, then repackage the content.xml into the .odc)

### ToDo

 * Might make sense to introduce a DeepL translation mode. That's perhaps faster because longer paragraphs can be translated at once. And reportedly it yields smoother/more natural translations.
 * <s>Unfortunately not sure yet how to [bundle
 * Nor how to craft an [options/settings page](wiki/OptionsDialog).