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

SLGray
Administrator
Reputation : 290
Points : 1514
Posts : 3644
View user profile http://fmthemes.forumotion.com

PostSLGray 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

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

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