MyBB Community Forums

Full Version: How to intergrate a translator on your forums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: workspace1059.png]

Go to:
ACP >> Templates & Style >> Templates >> (Select Template You Want To Edit)

Then
Show Thread Templates >> Then click on showthread_classic_header


[Image: workspace1060.png]

And replace everything in there with this:
<tr>
            <td class="tcat"><span class="smalltext"><strong>{$lang->author}</strong></span></td>            
                        <td class="tcat" width="15%"><div id="translate-this"><a href="http://translateth.is/" class="translate-this-button">Translate</a></div>

<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="http://x.translateth.is/translate-this.js"></script>
<script type="text/javascript">
TranslateThis({
  
    undoText : 'Undo ยป', // Text for untranslate link
    
    undoTime : 0, // Time undo link stays visible (milliseconds)
    
    fromLang : 'en', // Native language of your site

  undoLength : 0, // Time undo link stays visible (milliseconds)

      cookie : false
  
});
</script>
</td>                        
</tr> 

Next you want to edit showthread the one above showthread_classic_header.

Look in there for this:
</table>
    <div id="posts">
        {$posts} 

and add {$classic_header} above it if it is missing. So it looks like this:

</tr>
        {$classic_header}
    </table>
    <div id="posts">
        {$posts} 

Live Demo: http://forum.pinguyos.com
This isn't a MyCode.
I cant see this bar Sad
tanks gaz...

This script works very well ...
I know this post is a bit outdated but maybe someone replies Smile

I'm looking for a plugin like that. sadly the translate button on the demo page doesnt work anymore.
I can click it, choose my language but nothing happens.

Is there any other way to translate posts with a simple click?

ty !!!