• Resolved bmrtrek

    (@bmrtrek)


    Hello, in all the pages of my website, the translator window is not showing.

    It’s on the top left, it’s not into a menu.

    Strange thing : I can see it in my “normal” browser (Brave).

    Not showing on private Brave session, not showing on Safari, not showing on Brave on smartphone…

    Of course I flushed the browser cache and WP cache.

    Could you help me please ? Thanks !

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Prisna

    (@prisna)

    Greetings,

    Thanks for the explanation and link. The plugin works when you’re logged in as administrator. That’s why it doesn’t work on a private Brave session either.

    By checking the site’s HTML code, it seems you’re using a plugin (WP Rocket) feature to cache and minify js scripts:

    https://i.imgur.com/FKGv4xy.png

    You should disable this “rocketlazyloadscript” option. Also, the main js file:

    https://www.bmrtrek.re/wp-content/cache/min/1/translate_a/element.js?ver=1674587234

    Should be loaded directly from Google’s servers. So you should either disable it, or exclude this element.js file.

    Regards

    Thread Starter bmrtrek

    (@bmrtrek)

    Thank you for your answer.

    I ran some test on WP Rocket plugin. Effectively, deactivating “minify js files” make the Translator running. (it just need that. I can keep my LazyLoad).

    Is there a way to keep the js minify AND translator working ? (my site is moderatly fast…I would like to keep everything that could make it faster…)

    Excluding ” /wp-content/cache/min/1/translate_a/element.js ”

    on the 3 field (excluded javasctipt files, delay load JS and report JS execution do not change anything…Translator doesn’t appear.)

    I have tried to put the widget in a short code on the menu.

    Cool, it works on laptop, but never on phone. Even if minify JS and lazyLoad is off. (it should be up to the burger menu)

    The shortcode in the page do not appear neither.

    Thank you,

    • This reply was modified 1 year, 10 months ago by bmrtrek.
    • This reply was modified 1 year, 10 months ago by bmrtrek.
    Plugin Author Prisna

    (@prisna)

    Greetings,

    You should NOT exclude:

    /wp-content/cache/min/1/translate_a/element.js

    That’s the minified path. You should exclude the original path. Try:

    translate.google.com/translate_a/element.js

    Or simply:

    element.js

    If you have problems or questions about how to exclude this file using the WP Rocket plugin, you should contact their support team.

    The theme you’re using hides the area you chose to display the translator in the mobile view. There are two menus, one for desktop, one for mobile. The theme shows one and hides the other depending on the resolution.

    You can’t have two translators and do the same. You should place the translator in an area that’s always visible.

    Regards

    Thread Starter bmrtrek

    (@bmrtrek)

    Thank you for the precision about the code.
    
    "minify js" is activated on WP rocket, and I have just exclude?translate.google.com/translate_a/element.js. : It works, good : The GWT on the menu is showing.
    
    Right now, I've one GWT on?a short code on all the pages, also GWT on a shortcode widget on the menu on the center line for the laptop view. (3 lines menu possible on my theme). That works fine.
    
    For the?mobile menu, sure I know what you told me.
    
    So I put the widget on the upper line, then on the?side, and it's still not show..
    
    On that page :?https://www.bmrtrek.re/ , widget is on?the top line menu (you can see that the menu is wider than on the other pages)...
    
    GWT on the page is not showing. Not a big deal, I prefer on the menu.
    
    So now the problem is : How to show GWT on the top line of the mobile menu ?
    
    (note : I have 3 different headers on my site, please observe the one here :??https://www.bmrtrek.re/)
    
    Thank you for your time,
    
    BR
    Plugin Author Prisna

    (@prisna)

    Greetings,

    You can only have one translator per page. If you insert multiple shortcodes, only the first found instance in the html hierarchy tree will be rendered by the browser.

    If you can’t insert it in your desired area, then you’ll need to modify the theme files and insert the shortcode in the php form as explained in General > Usage. Probably it’d be best to create a child theme. You’ll need to choose a location that’s always visible across all resolutions.

    You should contact your theme developers to assist you with that. I hope you understand that we can’t assist you in modifying your theme files.

    Regards

    Thread Starter bmrtrek

    (@bmrtrek)

    Hello, I contact the theme developer, here is the answer :

    Hi there,

    Thank you for testing this and for your updates.

    Unfortunately, that’s not something we can do because how it works in Neve theme is that Mobile Header and Desktop header are two separate things, one is hidden on mobile view and another is hidden on desktop view, to visually show it looks like this when I uncheck the CSS that hides the mobile menu: https://vertis.d.pr/i/OWzBo7

    So as you see they are both rendered all the time, so the shortcode that you add should work and don’t have a limitation that it can only be rendered once on the same page, I would recommend to check this with the Translator plugin support, what are the options of the shortcode to use on the same page twice, maybe they have some alternative like 2nd element that could be used for such a case.

    So, there is no solution to add GWT in both Mobile and Desktop menu with that Neve theme ???

    Thanks,

    Plugin Author Prisna

    (@prisna)

    Greetings,

    Many themes have only one header, and then it’s styled in two or more ways for different resolutions. We can’t comment on as to why this theme uses two different headers instead of having one and style it in two different ways.

    Sorry, as said before, you can only have one translator per page. That’s a limitation imposed by Google. You should place the translator in an area that’s always visible, or use it either in the desktop or mobile header.

    Regards

    Thread Starter bmrtrek

    (@bmrtrek)

    OK, good to know. I put GWT on the pages itsef, ‘looking like” the menu.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Translator not showing’ is closed to new replies.