Changing images
Oct 21, 2015 3:45 pm by WPuser1
Oct 21, 2015 3:45 pm by WPuser1
Hi,
Apologies if the answer to this question is already somewhere on the site but I cannot find it by searching.
I would like to know how to change images on a translated version of the site? I am using the enterprise version and have images that include embedded text that I need to change for each language.
Many thanks
Re: Changing images
Oct 21, 2015 6:22 pm by Edvard
Oct 21, 2015 6:22 pm by Edvard
Hi,
Generally you need to detect the current selected language in the code by using $_SERVER['HTTP_X_GT_LANG'] PHP variable which contains the language code of current language or it is not set when you are on default language. Based on the value of that variable you will need to change src of your img tag to appropriate image.
If you can describe where exactly your image is, I can try to be more specific.
Thanks!
Re: Changing images
Dec 1, 2015 5:23 pm by WPuser1
Dec 1, 2015 5:23 pm by WPuser1
Hi, I struggling with this, I have seen on the plugin page on WP that you should "Wrap your content you want switched out in the "gtdm" shortcode. Example: [gtdm lang="en"] MEDIA HTML HERE [/gtdm]"
I need to change images on this page http://de.clondalkingroup.com/Märkte/
The code on the English version is:
[hover_pack img="http://www.clondalkingroup.com/wp-content/uploads/2015/04/SSD950-Clondalkin-Web-Images-600px-wide-v11.jpg" link="http://www.clondalkingroup.com/markets/beverages/" width="600" opacity="70"]
As you can see I am using a plugin already to animate the original image, can you help me with a solution?
Thanks
Re: Changing images
Dec 1, 2015 8:35 pm by Edvard
Dec 1, 2015 8:35 pm by Edvard
Hi,
I'm not familiar with gtdm plugin or shortcode, but you may contact the plugin developer and ask to use $_SERVER['HTTP_X_GT_LANG'] variable as current language, in that case the shortcode will work.
Edit: The GTranslate Dynamic Media plugin is developed for the free version only.
Thanks!
Re: Changing images
Dec 2, 2015 6:50 pm by WPuser1
Dec 2, 2015 6:50 pm by WPuser1
Can you please give me an example of the short code in context? I am not sure what you mean by "wrap your content you want switched out"
Re: Changing images
Dec 2, 2015 7:08 pm by Edvard
Dec 2, 2015 7:08 pm by Edvard
Hi,
The text you read is not provided by us, also the gtdm plugin is not developed by us. My understanding is that you need to use the following code:
[gtdm lang="en"] img code for English [/gtdm]
[gtdm lang="es"] img code for Spanish [/gtdm]
etc...
As I mentioned you need to ask gtdm plugin developer to enhance it, so it will work as well with Enterprise version.
Thanks!
SIMILAR TOPICS
Changing Numbers and URL Links | Jun 19, 2018 4:05 pm | Replies: 1 | Post by: ryancomtek |
Gtranslate changing some numbers to text in calendar | Apr 13, 2018 4:38 pm | Replies: 1 | Post by: pazaz |
Images not served on https page | Nov 11, 2016 7:38 am | Replies: 18 | Post by: sadashiv |
Wrong language shown after changing the language | Mar 14, 2016 1:05 pm | Replies: 1 | Post by: sadashiv |
Change images? | Dec 6, 2015 11:19 am | Replies: 5 | Post by: Bosse |