• Hi,

    I’m using Oxygen Builder for a client website.

    Usually, with Polylang, I simply create 2 templates for the header + footer (and the custom post types) and select either italian or english.

    So, i would have “Header + footer (IT)” (my langauge) and “Header + Footer (ENG)”.

    I can’t see anything related to this with WpMultilang, so I don’t know how to translate the header and footer content. Also, I have 8 custom templates that need to have certain part translated, that are not in wp core (so they don’t get automatically translated but they are on the frontend).

    Please let me know if there’s a solution for this.

    Giorgio

    • This topic was modified 4 years, 11 months ago by ziogio98.
Viewing 1 replies (of 1 total)
  • 01. Create a new Snippet with this:

    add_shortcode( 'wpm_translate', 'wpm_shortcode_translate' );
    function wpm_shortcode_translate( $atts, $content ) {
        $atts = shortcode_atts( array(
    		'lang' => wpm_get_language()
    	), $atts );
    
    	 return wpm_translate_string($content, $atts['lang']);
    }

    02. In Oxygen, use a Code Block and paste in some thing like this:

    <?php
    echo wpm_translate_string('[:it]Benvenuto[:en]Welcome[:]');
    ?>
    • This reply was modified 4 years, 11 months ago by Anticosti.
Viewing 1 replies (of 1 total)
  • The topic ‘How to create language-localized templates with Oxygen Builder’ is closed to new replies.