• Resolved kryvulena

    (@kryvulena)


    Hi there

    My theme uses a Slider Revolition slider that is populated across the site globally via its ID. It uses some html text on slides. I wish I translated them – is there a way to insert a code with both languages so that they would be displayed depending on selected language? I used to use x-translate before Qtranslate that used to allow me to insert ie. [:en]my Enlifh text[:de]my German text[:] – is any similar solution available at your plugin?

    Thanks for your answer in advance, have a great day.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter kryvulena

    (@kryvulena)

    One more related question: is there a way to insert separate Sharing details (Facebook, Twitter etc.) for Yoast SEO plugin for each language?

    Plugin Contributor Alex Gor

    (@alexgff)

    As for first question: You can use

    
    {:en}my English text{:}{:de}my German text{:}
    
    • This reply was modified 7 years, 5 months ago by Alex Gor.
    Thread Starter kryvulena

    (@kryvulena)

    wow thanks for the great news and the hint 🙂

    Thread Starter kryvulena

    (@kryvulena)

    Hi there one more time

    I noticed the code {:en}my English text{:}{:de}my German text{:} sometimes does not work in my theme’s custom fields. It’s just not being parsed and it results in both languages being displayed at the same time + the {:} code.

    Does your plugin support custom fields?

    Plugin Contributor Alex Gor

    (@alexgff)

    To output part of string in current language you can use next piece of code

    
    $meta = get_post_meta( $post->ID, 'meta_key', true );
    echo apply_filters( 'the_content', $meta );
    
    Thread Starter kryvulena

    (@kryvulena)

    Hi, thanks for fast reply. Do I need to insert the code into my theme’s funtions.php file? I’m familiar with basic WP php edits but I can’t recognize exact usage of the code.

    Plugin Contributor Alex Gor

    (@alexgff)

    You need to find place in your theme’s files. May be it will be functions.php
    Please refer
    https://developer.wordpress.org/themes/basics/template-hierarchy/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘inserting translation manually’ is closed to new replies.