How Can We Load GTranslate on Destkop Only?
-
Good Day,
We’ve enjoyed using your plugin for years. Works beautifully!
But now … we have an exciting challenge for you ??
How can we load the external script noted below on desktop only (the script is loaded by your plugin on all devices).
https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit2
At this time, we have chosen to display your dropdown translation widget only on desktops. However, by virtue of your widget code, the external file (HTTP request) noted above is still loading everywhere. We expect this, thus the reason for our request.
Details (Widget Code): https://prnt.sc/fwcS1EeHkS82
Details (Waterfall for Mobile Devices): https://prnt.sc/0WgHuAWd5hitThe following references came close to what we’re looking for, but didn’t help much or work:
For example, we wrapped your shortcode as follows but did not work: [desktoponly] [gtranslate] [/desktoponly]
Once again, help appreciated.
Thank you!
- The topic ‘How Can We Load GTranslate on Destkop Only?’ is closed to new replies.