• Resolved jowaltham

    (@jowaltham)


    Hi

    We’re working on a website that also uses the Google Translate plugin to offer the website in different languages. It uses a sub-directory URL structure for the translated pages. eg domain.com/page becomes domain.com/fr/page for French.

    We are using a custom float to top image and we’re finding that the /fr/ is being inserted into the src URL of the image when a page is translated. Of course domain.com/fr/image.jpg doesn’t exist as it’s only available at domain.com/image.jpg and so the Float to Top button doesn’t display.

    I have found it does the same when we use one of the default images.

    I don’t know how/why it is changing the custom image URL nor how to stop it.

    Any advice?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author cageehv

    (@cageehv)

    Hey Jo,

    I checked out your site. Looks beautiful!

    I did see the issue.

    The problem is that when you translate the page my plugin cannot find the button image.

    For instance if you translate to Dutch it’s looking for:
    https://staging.viscoseclosures.com/nl/back-to-top2.png
    So, it gets a 404 (not found) error.

    What you could try is to upload the button image to the WP media library and point at it in the settings page of my plugin (‘URL of a custom “Top of Page” image’)

    Let me know if that fixes your issue.

    Rolf

    Thread Starter jowaltham

    (@jowaltham)

    Hi

    Thanks for getting back to me. Unfortunately we first tried an image from the media library and the URL is translated, so is a 404. I’ve tried again and the same result.

    We’ve looked through the Google Translate options and there is no URL exclusion (we tried the phrase exclusions but that didn’t work).

    Sounds like the issue is with Google Translate plugin rather than Float To Top.

    Thanks

    • This reply was modified 4 years, 9 months ago by jowaltham.
    Plugin Author cageehv

    (@cageehv)

    Hey Jo,

    The only work around I can think of is:
    Create a folder at the top level of your site and call it ‘images’ or something like that.
    Put your button image in that folder and link to it in my plugin.
    So, the URL will be something like:
    https://staging.viscoseclosures.com/images/back-to-top2.png

    Success!

    Rolf

    Thread Starter jowaltham

    (@jowaltham)

    Thanks. That didn’t work either my GTranslate came back with some details to add to our NGINX config file and that’s fixed the issue.

    Plugin Author cageehv

    (@cageehv)

    Hey Jo,

    Cool that it fixed your issue!

    Rolf

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Back to top button disappears on translated pages’ is closed to new replies.