Buttons

From Apertium
Jump to navigation Jump to search

A button like this may be embedded in a webpage to offer its translation via Apertium.

The code is written so that the button does not appear in the translation.

<div class="c1">
<script type="text/javascript">
//<![CDATA[
    <!--
      var aquest="";
      aquest=document.URL;
      if (aquest.indexOf("apertium.org") == -1) { 
        document.write('<a href="http://www.apertium.org/common/tradurl.php?mark=&dir=ca-fr&inurl='+aquest+'">');
        document.write('En français avec Apertium<img alt="Apertium logo" border="0" ');
        document.write('src="http://wiki.apertium.org/w/images/thumb/1/14/Apertium_open_box_logo_768.png/300px-Apertium_open_box_logo_768.png" ');
        document.write('/>'+'<'+'/a>'); 
       }
     --> 
//]]>
</script></div>

Perhaps it would be possible to have a pull-down menu with available target languages... any ideas?