views:

11

answers:

0

I apply this script to my blog http://snipurl.com/10ympt but apostrophes are converted to &#39. How can I make the translation to ignore those characters? Help/Thanks!

<script type="text/javascript" src="/js/jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
    <script type="text/javascript">
    google.load("language", "1");

    $(document).ready(function(){
        $('#link1').toggle(function(){
                $('#bodycopy p, #bodycopy h2, #bodycopy li').each(function(){
                        var element = $(this);
                        google.language.translate($(this).text(), 'en', 'it', function(result){
                                $(element).text(result.translation);
                        });
                });
                $(this).html('Translate in English');
        }, function(){
                $('#bodycopy p, #bodycopy h2, #bodycopy li').each(function(){
                        var element = $(this);
                        google.language.translate($(this).text(), 'it', 'en', function(result){
                                $(element).text(result.translation);
                        });
                });
                $(this).html('Traduci in Italiano');
        });
    });
    </script> 


<p class="translate"><a id="link1" href="#container1">Traduci in Italiano</a></p>

<div id="bodycopy">   
Some text in english here
</div>