Support » Plugin: Transposh WordPress Translation » [Plugin: Transposh – translation filter for wordpress] How to change images based on selected langua

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Ofer Wald

    (@oferwald)

    Hello There,

    Assuming you have a file named image.jpg
    If you use the suggested variable above after it like:
    image<?php echo $my_transposh_plugin->target_language?>.jpg
    you will be able to use other images for other languages, such as imagees.jpg, imagehe.jpg, imagede.jpg etc.

    Good luck,

    Thanks for the quick response!

    I tried but WordPress is not allowing php to work inside page content.

    So instead of calling the language code, this is what shows in the source:

    <img src="../../wp-content/uploads/image<?php echo $my_transposh_plugin->target_language ?>.jpg” border=”0″ alt=”” align=”left” /><br />

    Ok, correction… I installed PHP Execution plugin so php would work in posts now.

    Looks like the language code letters are passed through, but in an odd location (ie not where the code is placed, but in the filepath).

    so instead of getting this:
    ../../wp-content/uploads/imagees.jpg

    I get this:
    ../../es/wp-content/uploads/image.jpg

    It’s workable though, I can put a new directory and upload my images there.

    Thank you for your help!!

    Plugin Author Ofer Wald

    (@oferwald)

    Hello,

    My solution actually referred to images in themes, but I am happy that you were able to found a proper solution, I will try to find a better solution for future versions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Transposh – translation filter for wordpress] How to change images based on selected langua’ is closed to new replies.