Announcement

#1 2011-08-01 12:26:10

Bogdan
Member
2011-06-11
22

[resolved] How to add Google Translate snippet in Piwigo?

Hi,
I'm trying to add the Google Translate snippet on my site, but using PWG Stuffs or Advanced Menu Manager doesn't do anything.
The code is the following:
<div id="google_translate_element"></div>
<script>
function googleTranslateElementInit() {
  new google.translate.TranslateElement({
    pageLanguage: 'en',
    gaTrack: true,
    gaId: 'xx-xxxxxxxx-x',
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
  }, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit">
</script>
If I add the code directly into the header, the code is working, but i'd like it integrated somehow into the main block or the menu.
Thank you,
Bogdan

Offline

 

#2 2011-08-06 22:56:45

Gotcha
Former Piwigo Team
Pourrières (83) [FR]
2007-03-14
604

Re: [resolved] How to add Google Translate snippet in Piwigo?

Offline

 

#3 2011-08-08 16:18:08

J.Commelin
Member
2011-01-08
36

Re: [resolved] How to add Google Translate snippet in Piwigo?

Bogdan wrote:

Hi,
I'm trying to add the Google Translate snippet on my site, but using PWG Stuffs or Advanced Menu Manager doesn't do anything.

I think he did (-;þ

Offline

 

#4 2011-08-08 17:05:23

Gotcha
Former Piwigo Team
Pourrières (83) [FR]
2007-03-14
604

Re: [resolved] How to add Google Translate snippet in Piwigo?

Okay I'm bad :-(
But the code works. I insert in [extension by sakkhho] Statistics, and had my translate button.

Offline

 

#5 2011-08-09 10:43:46

Bogdan
Member
2011-06-11
22

Re: [resolved] How to add Google Translate snippet in Piwigo?

Hi guys, thanks for the help.
In the end i adopted another solution.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact