Quick View contents do not get translated

I’m currently using qtranslate-x for everything on the site I’m building and it’s working just fine for everything, woocommerce and what not. The only place that does not get translated is when clicking the “quick view” on product items - it splats the entire content into the quick view popup.

I went poking around in the php - now, I don’t know php, although I’m very familiar with programming, and I in particularly don’t know the WP framework, but I suspect it isn’t pulling in the function/library required to translate in the quickview? Is there something I can add to any of the php files to include the qtranslate-x plugin or something?

Hello,

First thanks for using our theme!

Which content exactly is not being translated? For example, the “Add To Cart” button text? If possible, also share with us your website link/URL.

I did a test here and the content inside of quick view popup is translatable.

Kind Regards,

Rodrigo.

aThemes Support

I don’t really want to share the link, since it means I have to turn on the quick view functionality and it will look strange, however, it’s not the the woocommerce parts that fail, it’s the actual description data that somehow moves “past” the qTranslate-X plugin. I’m submitting an image of what I mean. When clicking on the product, the description & short description works perfectly fine, which is why I believe there is something with the quick view code that somehow circumvents the qTranslate-X plugin.

I’ll post a link if this doesn’t give you enough to go on.

As you can see, it’s not translating the Swedish, English nor the German, it just splats out the entire content. However, when one clicks the products in the webshop/woocommerce, it gets translated perfectly fine.

I’m adding the link here anyway, and I’m turning it off in 24hrs, since it can’t really look like that.

tigerflicka.com

It seems as though quick view is making an asynchronous call after skimming through very lightly - if this is true, this could be the culprit (or somewhere in the vicinity of it) since the data just gets splatted out, since it’s just received, it isn’t running through ordinary channels, so to speak, thus qtranslate-x isn’t able to perform any translation. This is just speculation, but I’d say it’s probably close to what’s going on.

Hello,

You are right. The quick view works with an AJAX request that returns the product content inside the popup. Seems that the the qtranslate-x uses JS to translate, and probably that’s the reason. Also, seems that this plugin is deprecated: qTranslate X – WordPress plugin | WordPress.org

So probably the best way is try another plugin.

My suggestion for you is use the plugins Loco Translate + Polylang. With Loco Translate you can generate the languages for your website and translate the strings/texts. The problem is that Loco Translate don’t offer a language switcher. So, for the language switcher you can use the Polylang plugin.

Loco Translate:

Polylang:

We hope this helps!

Let us know if you need further help.

Kind Regards,

Rodrigo.

aThemes Support

Thanks for your reply. Yes, unfortunately the site was built by people, quite some time ago and they for some reason decided to use that plugin, and the problem with it, is that it seems to not make individual entries into the database, which means I would have to migrate the database, which is unpleasant, to say the least.

I might be able to patch over it, with some added Javascript, that just parses the results as an hack, since I know what languages I’m getting back and since it really has nothing to do with how the woocommerce plugin (or the Botiga theme for that matter) operates. i.e. just look for

[:sv] some content [:]

and remove accordingly. I’ll leave this comment so that anyone in the future who might possibly still be using the deprecated plugin qtranslate-x, will see how it could possibly solved.

Thanks again

Hello,

Great! Good idea!

You are welcome!

If you need further help with the theme, feel free to contact us.

Kind Regards,

Rodrigo.

aThemes Support