Okay
  Public Ticket #2574704
TranslatePress
Closed

Comments

  • Stefano Ansaldi started the conversation

    I'm using TranslatePress plugin and I would like to manage the video from youtube in the home page depending by the language but this solution doesn't work :https://translatepress.com/docs/translation-shortcode/


    [trp_language language=”de_DE”]
    <iframe src=”https://www.youtube.com/embed/s-jnowzMbU8″; width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
    [/trp_language]
    [trp_language language=”it_IT”]
    <iframe src=”https://www.youtube.com/embed/U3ZOizblgg4″; width=”560″ height=”315″ frameborder=”0″ allowfullscreen=”allowfullscreen”></iframe>
    [/trp_language]


    My question is why this shortcodes doesn't work ?

    How can I use instead this PHP code :


    <?
    php    $current_language = get_locale();
        if( $current_language == 'en_EN' ){      
    echo 'text in language en_EN';    }        
        if( $current_language == 'fr_FR' ){      
    echo 'text in language fr_FR';    }    
    ?>

    Or how i can detect the current language in order to use it ?


    Thanks  a lot

  •  1,798
    Support Agent replied

    Hi Stefano,

    Please note that we didn't test our theme with TranslatePress plugin so we can not guarantee compatibility or offer support for its integration. We have tested WPML plugin and offer support for it.

    Regarding the php code you can try to place it to functions.php file of child theme and see if it works.

    Let us know if you need additional assistance.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!

  • Stefano Ansaldi replied

    Hello, Fine I understand .

    I have anyway a workaround that I would like to try before giving up.

    I would like to load a WP-Page in to an IFrame in the Text Object.

    How can I exclude the theme from a single page ? I would like to have only this code shown

    <a href="https://youtu.be/s-jnowzMbU8">
    <img class="alignnone size-full wp-image-2232" src="http://my-zwork.com/wp-content/uploads/2020/10/HOME_VIDEO_ITA_DEU.png" alt="" width="1123" height="576">
    </a>
  •  1,798
    Support Agent replied

    Hi Stefano,

    You should place that code to Text tab of Text element like this:

    3432360302.png


    1808974443.png

    Let us know if that helped.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!

  • Stefano Ansaldi replied

    Yes . thanks. That was fine and already did.

    My problem now is to create a single page without the additional theme items like : Logo , Menu and Footbar .

    I would like to have only the youtube iframe in it.

  • Stefano Ansaldi replied

    the image 

    Attached files:  Immagine 2020-10-23 134929.jpg

  •  1,798
    Support Agent replied

    Hi,

    Please follow instructions below:

    Edit page and set below_menu to true:

    5105329480.png

    Then add the following css code to Custom css of the page:

    .btSiteFooterWidgets {
    display:none;
    }
    .btStickyHeaderActive .btLogoArea {
       display: none;
    } .btLogoArea {    display: none;
    }
    2195056407.png

    Let us know if that helped.

    Regards, BoldThemes team

    If you like our products please consider leaving us a rating. A huge thank you from BoldThemes in advance!