The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Transposh WordPress Translation
[resolved] [Plugin: Transposh - translation filter for wordpress] How to change images based on selected langua (5 posts)

  1. jackie.taferner
    Posted 5 years ago #

    I see on the plugin's FAQ page that I can change images based on language.

    But what "descriptor" is this referring to? Can please elaborate on how to go about this?


    you can use the $my_transposh_plugin->target_language as part of the image descriptor, this will load different images based on the current language.


  2. Ofer Wald
    Plugin Author

    Posted 5 years ago #

    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,

  3. jackie.taferner
    Posted 5 years ago #

    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 />
  4. jackie.taferner
    Posted 5 years ago #

    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:

    I get this:

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

    Thank you for your help!!

  5. Ofer Wald
    Plugin Author

    Posted 5 years ago #


    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Transposh WordPress Translation
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic