Forum Archive - Caching and gTranslate

Caching and gTranslate
May 3, 2018 2:08 pm by challisc
Hi there I want to show a different image on each translated page. For example, I want to show a Spanish shopping cart in Spanish, an English shopping cart in English, a French shopping cart in French etc. The way I have implemented this is to add backend code that determines the language and displays the correct image accordingly The problems occur when I try to cache these pages. The pages aren’t dynamic at all - static pages with no dynamic elements. But caching using cloudflare, comet cache or any other caching mechanism displays the same shopping cart on all translated page, regardless of the language.
Re: Caching and gTranslate
May 8, 2018 4:40 pm by Yana
Hi, This option is available for paid versions. In order to load different images, pdf files or links for each translated language you should add the path of the translated version in tag with data-gt-href-xx attribute where xx is the language code. Here is an example : For links <a href="http://example.com" data-gt-href-fr="http://french-website.com" data-gt-href-pt="http://portuguese-example.com">Test</a> For PDF files <a href="/link-to.pdf" data-gt-href-es="/link-to-Spanish.pdf data-gt-href-ru="/link-to-Russian.pdf ">pdf file</a> For Images (Images can be changed on GTranslate edit mode also) <img src="example.jpg" src-fr="example-french.jpg" ... />

SIMILAR TOPICS

Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon
Instragram and Gtranslate...!!!!Dec 19, 2018 11:18 amReplies: 1Post by: zackfernandes

Try GTranslate with a free 15 day trial