0
Good afternoon, I’m using the library React-Intl to internationalize texts in pt_br and English in a React web application project, but I need to translate the images as well and I have no idea how to do this. For the translation of the texts I am using Formattedmessage, sort of like this:
<p><FormattedMessage id={"text"} defaultMessage={"Texto original"}/></p>
I tried to use the same logic for images but found nothing similar. pt_br and en images are called in tags <img src={}/>
later in the application. How can I change the image depending on the language the user is using?
The images are at some address, or are local in the project?
– Anderson Henrique
You need to change the image according to the language?
– Lukas Takahashi
They’re at the project site. I have the same image in en and en and need to change them according to the language that the user is viewing the site (in case, if you have not specified the default is en)
– deadpool