LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

βŒˆβŒ‹ βŽ‡ branch:  PageTranslate

File help/en/vnd.include-once.pagetranslate/ from the latest check-in

<?xml version="1.0"?>
<?xml-stylesheet href="./mallard2xhp.xsl" type="text/xsl"?>


<title>Extending menu options</title>

<section id="addons">
<p>Adding a new target language to the PageTranslate tools menu requires
just a bit of effort, but little programming.</p>
 <item>Get a copy of the <file>pagetranslate.oxt</file> package.</item>
 <item>Unzip the file (<file>.oxt</file> is a <app>.zip</app>) in an empty directory.</item>
 <item>Edit the <file>Addons.xcu</file>
     <item>Therein <em>duplicate</em> one of the following blocks:
      <node oor:name="M2XXXXXXXX" oor:op="replace">
        <prop oor:name="Context" oor:type="xs:string"><value/></prop>
        <prop oor:name="URL" oor:type="xs:string"><value>service:org.openoffice.comp.pyuno.pagetranslate?trigger&amp;lang=XX</value></prop>
        <prop oor:name="Title" oor:type="xs:string"><value/><value xml:lang="en-US">β†’Lang XX</value></prop>
        <prop oor:name="Target" oor:type="xs:string"><value>_self</value></prop>
     <item>Edit the <em>lang=XX</em> for the URL to actually change the behaviour.
           The <em>XX</em> must be a two-letter language code (for instance "ru" or "dk") and all lowercase.</item>
     <item>The title β†’Lang should be descriptive, obviously.</item>
     <item>Also make the oor:name="M2………" identifier unique in this xml file.</item>
 <item>And finally just repackage the <file>Addons.xcu</file> into the oxt:
   <p><input>zip a pagetranslate.oxt Addons.xcu</input></p>
 <item>Then reinstall the customized extension.</item>

There's also a contrib/dev script <file></file> to generate such a language block,
which crafts the Unicode flag emoji as well. If you want to contribute/correct some of the
existing menu entries, please just register a repository account and send a mail to have it
elevated for commit permissions.