WordPress.org

Ready to get started?Download WordPress

Forums

Transposh WordPress Translation
Code in header (not in widget) to make default language not as an option (2 posts)

  1. ramystyle123
    Member
    Posted 1 year ago #

    Hi,

    I have a site in English. I would like to add in the header part of my page the following:
    ENGLISH | FRANCAIS

    However, I would like that if the user is in the english page to only show FRANCAIS and if the user is on the french page to only show ENGLISH ?

    I don't want to show any flags.

    Can someone guide me on the code to insert? I have zero knowledge in php but i thing to should be an "if" function ? :)

    Thanks for your help !

    http://wordpress.org/extend/plugins/transposh-translation-filter-for-wordpress/

  2. Ofer Wald
    Member
    Plugin Author

    Posted 1 year ago #

    use something like

    if ('en' == transposh_get_current_language()) {
    echo "english";
    }
    elseif ('fr' == transposh_get_current_language()) {
    echo "francais";
    }

    Good luck

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic