2 replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
source | link

I've installed Views along with the Internationalization views module. I have a view of users. The users have some single-value boolean fields in their profiles. I would like to rewrite the results of these fields so that if they are true an image and some text is shown.

Example: If "likes_soccer field is true, then show an image of a soccer ball with the words "Loves soccer"

This is quite simple to do in Views.

However, I also need to translate the text, and this is where I'm running into problems. Internationalization Views allows the text to be translated, but because it is HTML it ends up being sanitized so that the IMG tag is displayed as code rather than interpreted as HTML (as this answer explainsthis answer explains). I can simply ignore the IMG tag in my translation, which will allow me to translate the text, but then I will lose the image in the translation.

Is there an alternative way to do this?

I've installed Views along with the Internationalization views module. I have a view of users. The users have some single-value boolean fields in their profiles. I would like to rewrite the results of these fields so that if they are true an image and some text is shown.

Example: If "likes_soccer field is true, then show an image of a soccer ball with the words "Loves soccer"

This is quite simple to do in Views.

However, I also need to translate the text, and this is where I'm running into problems. Internationalization Views allows the text to be translated, but because it is HTML it ends up being sanitized so that the IMG tag is displayed as code rather than interpreted as HTML (as this answer explains). I can simply ignore the IMG tag in my translation, which will allow me to translate the text, but then I will lose the image in the translation.

Is there an alternative way to do this?

I've installed Views along with the Internationalization views module. I have a view of users. The users have some single-value boolean fields in their profiles. I would like to rewrite the results of these fields so that if they are true an image and some text is shown.

Example: If "likes_soccer field is true, then show an image of a soccer ball with the words "Loves soccer"

This is quite simple to do in Views.

However, I also need to translate the text, and this is where I'm running into problems. Internationalization Views allows the text to be translated, but because it is HTML it ends up being sanitized so that the IMG tag is displayed as code rather than interpreted as HTML (as this answer explains). I can simply ignore the IMG tag in my translation, which will allow me to translate the text, but then I will lose the image in the translation.

Is there an alternative way to do this?

1
source | link

In Views, how can I use the rewrite text to include an image in HTML with some text and then translate the text?

I've installed Views along with the Internationalization views module. I have a view of users. The users have some single-value boolean fields in their profiles. I would like to rewrite the results of these fields so that if they are true an image and some text is shown.

Example: If "likes_soccer field is true, then show an image of a soccer ball with the words "Loves soccer"

This is quite simple to do in Views.

However, I also need to translate the text, and this is where I'm running into problems. Internationalization Views allows the text to be translated, but because it is HTML it ends up being sanitized so that the IMG tag is displayed as code rather than interpreted as HTML (as this answer explains). I can simply ignore the IMG tag in my translation, which will allow me to translate the text, but then I will lose the image in the translation.

Is there an alternative way to do this?