Announcement

Collapse
No announcement yet.

Google website translator problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Google website translator problem

    I've used the website translator wizard to create code to pop into my Sellerdeck v11 site. Works perfectly on every page - apart from the home page.

    Ideas anyone please?

    Site is http://www.vape-atomizer-mesh.com - still in development ;-)

    Thanks

    #2
    This line is wrong on your home page:

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

    SD is munging what you provided and adding products/. Could you post the code you used to create the above line?
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      You'll probably fix it by changing:

      //translate.google.com

      into

      http://translate.google.com
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Norman you're wonderful. Thanks very much indeed - works a treat. We have to stop meeting like this...! ;-)

        Comment


          #5
          Just so you (or anyone with a similar problem) will know what was wrong and what the fix was:

          Google was using an URL like //translate.google.com....

          Since this didn't have an http: or https: bit the code would work regardless of whether the website in question was on http or https (the protocol used for the current page would have been used to load the file from Google). This is good as customers wouldn't get the dreaded "Page contains secure and insecure elements" warning if the page parts arrived using different protocols.

          Unfortunately, SellerDeck when it sees pathnames with no http:// or https:// - like wowza.js - assumes that wowza.js will be uploaded and managed by itself.

          All these files go in to acatalog (the default) or products (in your case) on the server.

          The home page is not within products (or acatalog) so a prefix like products/ (or acatalog/) is added by SD in order to point to the correct folder. SD isn't currently clever enough to note that these // type prefixes should be left alone.

          If any resource starts with http:// or https:// then SD will leave it alone (it's definitely an external resource after all). Hence the fix that you're now using.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Thanks v much Norman.

            I'm finding that depending on which layout I choose in the translator wizard, it can cause a javascript error within SD. Of course all the ones I prefer cause the error!

            I'll make do with one of the layouts that doesn't cause an error (so no need for anyone to try and fix for me) but would be interested to know if anyone else ever has the same problem.

            Comment


              #7
              If you can upload a demo page that has the JS error perhaps we can work out how to fix it.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Ok! Again - much appreciated.

                I've uploaded a javascript error version. I wanted the 'tabbed - top right' layout but it's showing the dropdown layout and the box looks too tall for the contents.

                The other thing I've noticed with Google Translate is that SD runs so slowly now. Found a thread about this but nobody found a solution other than to remove the code...

                http://community.sellerdeck.com/show...ogle+translate

                Comment


                  #9
                  The usual solution for external code slowing the site is to put a BlockIf containing IsNotPrevewMode around such code.

                  On your live site, I'm not seeing any javaScript problem - except some styling funnies due to some of the SD CSS messing with the google stuff.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Javascript error

                    Thanks for the tip re the blockif - I'll give it a go.

                    I am seeing a JS error in SD here but can't see any details (see attached screen shot)

                    JS not my strong point as you know!
                    Attached Files

                    Comment


                      #11
                      That JS error is probably a warning that you're trying to load code from an external site while in the local Preview pane. It'll go away when you do the IsNot PreviewMode fix.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Spot on again thanks Norman. All sorted. :-)

                        Comment

                        Working...
                        X