[Tutorial] Google Translate
5 posters
[Tutorial] Google Translate
GOOGLE TRANSLATE TUTORIAL
I am not sure if this is done before, but it is not, let's see how it works.
Step 1
AP > Display > Templates > General > overall_header
Here, look for already created navbar list.
It should look like this:
- Code:
<ul class="navbar navlinks{NAVBAR_BORDERLESS}">
<li>{GENERATED_NAV_BAR}</li>
<li id="google_translate_element"></li>
</ul>
- Code:
<li id="google_translate_element"></li>
On the top of the page, you will see lot's of scripts, so let's add our own:
- Code:
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.SIMPLE}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
Step 2
How does it look like?
![[Tutorial] Google Translate Screenshot_1](https://image.ibb.co/jxYZaK/Screenshot_1.jpg)
I know, I know, it is ugly as hell. But, it is up to you to change CSS as you want it. This tutorial does not cover that. As you know, default language for forums is English. I will pick Spanish here and let you see how translation work.
![[Tutorial] Google Translate Screenshot_2](https://image.ibb.co/nkiBNz/Screenshot_2.jpg)
Final result looks like this:
![[Tutorial] Google Translate Screenshot_3](https://image.ibb.co/mMpwpe/Screenshot_3.jpg)
And the forum itself:
![[Tutorial] Google Translate Screenshot_4](https://image.ibb.co/nnuCUe/Screenshot_4.jpg)
Hope you guys like this tutorial if it has not done before.
Credits to Google translate scripts - I simply integrated this into Forumotion
System32- Forumember
-
Posts : 156
Reputation : 13
Language : Serbian,English
Re: [Tutorial] Google Translate
Thank you for sharing us this!
For default overall_header template, I'll provide some example for adding Google Translate based on your forum version
For default overall_header template, I'll provide some example for adding Google Translate based on your forum version
- PunBB & Invision :
- Code:
<ul class="clearfix">
<li>{GENERATED_NAV_BAR}</li>
<li id="google_translate_element"></li>
</ul>
- PhpBB3 :
- Code:
<ul class="linklist navlinks{NAVBAR_BORDERLESS}">
<li>{GENERATED_NAV_BAR}</li>
<li id="google_translate_element"></li>
</ul>
- PhpBB2 :
- Code:
<tr class="linklist navlinks{NAVBAR_BORDERLESS}">
<td align="{MENU_POSITION}"{MENU_NOWRAP}>{GENERATED_NAV_BAR}</td>
<td id="google_translate_element"></td>
</tr>
SarkZKalie- Support Moderator
-
Posts : 1348
Reputation : 215
Language : English
Re: [Tutorial] Google Translate
Thanks for completing it. I did it only for one version I was testing it.
System32- Forumember
-
Posts : 156
Reputation : 13
Language : Serbian,English
Re: [Tutorial] Google Translate
I remember this using a Javascript and the translation option scrolling in the forum.
If you don't want to see in all the page, this will be a good option.
Well done!
If you don't want to see in all the page, this will be a good option.
Well done!
YoshiGM- Active Poster
-
Posts : 1236
Reputation : 133
Language : Spanish & English
Location : Mexico
Re: [Tutorial] Google Translate
How does this work for ModernBB version? My forum is looking at doing this but we can't figure out how. Thank-you!
P.S. I tried following the instructions the exact way as posted here, but nothing seems to be popping up.
Thanks for your help!
P.S. I tried following the instructions the exact way as posted here, but nothing seems to be popping up.
Thanks for your help!
Johnalex Zarco- New Member
-
Posts : 9
Reputation : 1
Language : English
Location : USA
Re: [Tutorial] Google Translate
Johnalex Zarco wrote:How does this work for ModernBB version? My forum is looking at doing this but we can't figure out how. Thank-you!
P.S. I tried following the instructions the exact way as posted here, but nothing seems to be popping up.
Thanks for your help!
you can add this instead https://help.forumotion.com/t140278-add-a-translator-on-your-forum?highlight=translator
skouliki- Manager
-
Posts : 12592
Reputation : 1536
Language : English,Greek
Location : Greece
TonnyKamper and System32 like this post
Re: [Tutorial] Google Translate
skouliki wrote:Johnalex Zarco wrote:How does this work for ModernBB version? My forum is looking at doing this but we can't figure out how. Thank-you!
P.S. I tried following the instructions the exact way as posted here, but nothing seems to be popping up.
Thanks for your help!
you can add this instead https://help.forumotion.com/t140278-add-a-translator-on-your-forum?highlight=translator
I got the code inputted correctly as instructed in that thread:
![[Tutorial] Google Translate 110](https://i.servimg.com/u/f84/20/24/13/44/110.png)
I put it in for the BOTTOM_LEFT, and it still isn't showing up. Am I missing something?
![[Tutorial] Google Translate 111](https://i.servimg.com/u/f84/20/24/13/44/111.png)
Thank-you for your help ^_^
Johnalex Zarco- New Member
-
Posts : 9
Reputation : 1
Language : English
Location : USA
Re: [Tutorial] Google Translate
Hello @Johnalex Zarco please provide your site URL here
EDIT: I couldn't find any ID google_translate_element on your site. Make sure you modified overall_header template and added it to navigation bar from first post
EDIT: I couldn't find any ID google_translate_element on your site. Make sure you modified overall_header template and added it to navigation bar from first post
SarkZKalie- Support Moderator
-
Posts : 1348
Reputation : 215
Language : English
skouliki- Manager
-
Posts : 12592
Reputation : 1536
Language : English,Greek
Location : Greece
Re: [Tutorial] Google Translate
SarkZKalie wrote:Hello @Johnalex Zarco please provide your site URL here
EDIT: I couldn't find any ID google_translate_element on your site. Make sure you modified overall_header template and added it to navigation bar from first post
I did do that, and it wasn't working.
Javascript should be enabled. Could it not be appearing because my computer doesn't have Javascript installed?
ETA I went and checked and it wasn't enabled. Upon enabling it, the thing popped right up. Thank-you so much for your help (I am clearly not tech savvy lol)
Last edited by Johnalex Zarco on August 1st 2020, 6:54 am; edited 1 time in total (Reason for editing : Discovered new info :))
Johnalex Zarco- New Member
-
Posts : 9
Reputation : 1
Language : English
Location : USA
skouliki likes this post
skouliki- Manager
-
Posts : 12592
Reputation : 1536
Language : English,Greek
Location : Greece
Johnalex Zarco likes this post

» help with google translate, please..
» forumsclub not translate by google
» Google box translate code
» Incorporating Google translate
» Google Translate Issue
» forumsclub not translate by google
» Google box translate code
» Incorporating Google translate
» Google Translate Issue
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum