FM Themes
Welcome to FM Themes
where you can share your punBB, phpBB 2, Invision, & phpBB 3 themes for Forumotion forums.

You are viewing the forum as a guest, so you will not be able to use the full forum. To use all the features of the forum, you need to log in or create a FREE account by registering.

How To Add Google Translate

View previous topic View next topic Go down

How To Add Google Translate

Post by SLGray on Sun Oct 06, 2013 4:26 pm

How To Add Google Translate
This tutorial will show how to add Google Translate to your forum.

To add it to every page, place it in an announcement:

Administration Panel -> General -> Messages & Emails -> Announcement


Make sure that it is set for every page.

Create a new announcement or add this code to an old announcement:
Code: Select Content
Code:
<script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    floatPosition: google.translate.TranslateElement.FloatPosition.BOTTOM_RIGHT
  });
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
To change the location of the Translate button, change this part of the code:
Code: Select Content
Code:
FloatPosition.BOTTOM_RIGHT
BOTTOM_RIGHT

BOTTOM_LEFT

TOP_RIGHT

TOP_LEFT

You may also add the code to a widget.
Tutorial written by: SLGray

SLGray
Administrator

Reputation : 294
Points : 1597
Posts : 3723

View user profile http://fmthemes.forumotion.com

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum