10 Replies Latest reply on Apr 1, 2014 6:00 AM by mnevill

    Google Translate and Translate This with SSL = IE warnings

    mnevill

      We are looking into adding free translations services built into our header and have hit a couple of road blocks.  The main problem is that our site is SSL and seems to cause issues with translation services producing IE security warnings. I know IE can be configured to shut up, but may be a headache for regular old Joe user not to mention create a bad first experience in our external support community.  Translate This seems to have an invalid certificate, which also causes problems.  I know several people use either Translate This or Google Translate with Jive configured as HTTP and it works great, but we need to stick with SSL on ours. If anyone has successfully implemented free translation built into an SSL site without IE being a pain please chime in.

       

      Thanks,
      Matt

        • Re: Google Translate and Translate This with SSL = IE warnings
          mnevill

          I think this is actually working without IE problems now.  Here is the code we used, which I think is the default from Google.

           

          Google Translate Code

          ---------------------

          <div id="google_translate_element"></div><script>

          function googleTranslateElementInit() {

            new google.translate.TranslateElement({

              pageLanguage: 'en'

            }, 'google_translate_element');

          }

          </script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>

          • Re: Google Translate and Translate This with SSL = IE warnings
            jose.gonzalez

            Thanks! It is a pity that it is not my question to give you full credit for this.

             

            Have you tried to integrate google translate in your community?

             

            Thanks again!

              • Re: Google Translate and Translate This with SSL = IE warnings
                JasonLax

                No worries.  I tried a Google custom search box, actually.  Completely crashed the page by locking it like this.

                • Re: Google Translate and Translate This with SSL = IE warnings
                  mnevill

                  We moved it into our theme instead of via an HTML widget, and customized it a bit.  This is all greek to me since I don't code, but here is what I peeled out of our theme in case it helps anyone else:

                   

                  Admin Console > System > Settings > Themes > edit your current theme > edit /template/global/custom-css.ftl:

                   

                  /* ----GOOGLE TRANSLATE ----- */

                  .goog-te-gadget {

                  display: inline !important;

                  float: left !important;

                  height: 18px !important;

                  width: 150px !important;

                  overflow: hidden !important;

                  position: relative !important;

                  zoom: 1 !important;

                  }

                  .goog-te-gadget-simple .goog-te-menu-value span {

                  font: 11px Verdana, Geneva,sans-serif !important;

                  font-weight: bold !important;

                  margin: 0 !important;

                  }

                  .goog-te-gadget-simple {

                  border: none !important;

                  background-color: transparent !important;

                  padding: 0 !important;

                  }

                  .goog-te-gadget-simple span:nth-child(2){

                  vertical-align: inherit !important;

                  }

                  .goog-te-menu-value img {

                  display: none !important;

                  }

                  .goog-te-gadget img {

                  display: none !important;

                  }

                  .goog-te-menu-value span:nth-child(3) {

                  display: none !important;

                  }

                  Then edit /template/decorator/default/template.ftl:

                  <#--Google Translate script -->

                  <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>

                  <#-- End Google Translate script -->

                  Those are the only snippets I'm aware of.