Unable to translate HTML tags
-
I am having problems translating pages with HTML <picture> elements. I use this to switch what image is loaded to the user depending on the screen size of the device that he is using. For example:
<picture> <source srcset="mdn-banner-wide.png" media="(min-width: 600px)"> <img src="mdn-banner-narrow.png" alt="MDN"> </picture>
Those banners have text on them, so I need to be able to switch which banner is shown depending on the language. However, no matter what I do, I can not get TranslatePress to detect the string inside the <source> tag, only the image tag.
As a result, when I am browsing my website in the default language (Portuguese), everything works fine. But when I am browsing in the second language (English), the wide version of the banner displayed is the Portuguese one, because I could only use TranslatePress to translate the link of the narrow one to the English version of the image.
How can I fix this issue? Thank you for your help!
- The topic ‘Unable to translate HTML tags’ is closed to new replies.