-
Issue description:
When I install insert the code of “Website Translator” on my website, the total ratings from the app " All-in-one Reviews" is no longer accurate when switching between languages -
Link to the page with the widget in question: https://www.comayhaircare.com/
Hi there, @user15545
I see that you’ve removed your Website Translator widget from this page. Could you please bring it back or install it to the test page (with your All-in-One Reviews widget)?
We’ll be happy to investigate it for you
Hi Max, I have re-installed the Website Translator widget. You will see that the total ratings from the app is either showing the number of Google or Facebook, thus the total is not accurate (should be 600+ reviews)
Thank you!
I’ve shared your request with the devs. I’ll report back once I have their response
Thank you for waiting!
We’ve fixed the issue by adding this code to the Custom JS field on the Settings tab of your All-in-One Reviews settings:
const firstTabSelector = ".es-tabs-slider-item:first-child .es-tab-container";
const lastTabSelector = ".es-tabs-slider-item:last-child .es-tab-container";
widget.on("init", ({ widgetContainer }) => {
setTimeout(() => {
widgetContainer.querySelector(lastTabSelector)?.click();
widgetContainer.querySelector(firstTabSelector)?.click();
}, 200);
});
Please check it out and let me know if you like the result
Many thanks, Max! It works now. Appreciate your help.
Great! You are always welcome
Hi Max, sorry to bother you again. The Website Translator widget now loads the original language, then flash the screen, and only then shows the translated version. This happens whenever I click on any page / sub-page on the website too. Could you please help me check with the dev team to check if there is any way to avoid showing of the first language and flashing? My website is comayhaircare.com. Many thanks!
Hi there, @user15545
The thing is that the widget needs some time to collect the phrases, send them to the server and get their translated versions, that’s why the page gets translated to a chosen language with a slight delay.
Please let me know if this clarifies things or if you have any questions left
Hi Max, I understand the logic. However, when a website is translated using Chrome, normally it does not flash the screen. Is there any way to flash the screen only once (i.e. the rest of pages and subpages are translated in the background before being clicked on)?
Hi @user15545
If I got you right, you’d like the page to be reloaded only once (on the 1st page load). And after that, when opening subpages the chosen language should be applied to them and they won’t be reloaded.
If it is, unfortunately, it’s impossible to translate all the website pages in background. I hope this explains things.
However, if I misunderstood you, please describe your idea in more detail
Hi Max, I understand the constraints. Could you please advise if the translation can happen without flashing the screen at all (same as when Chrome / Edge does it web translation without flashing)?
I am really sorry, but, unfortunately, it’s impossible to remove flashing at all.
Please let me know if this clarifies the situation or if you have any questions left.