• Hi all,
    I have a problem with translating strings added to frontpage using the extra options tab in theme settings. I’ve found several topics from this forum but all of them apply to other themes. Sorry for writing a new topic but I can’t manage to solve the problem After a few hours of trying i gave up.
    I know that I must create a wpml-config.xml file. but what exactly should I write in it (according to my theme)?
    I’m trying to translate the text from frontpage (Tempera Settings -> Frontpage -> Addons -> “Main title” and “main text”)
    Thank’s for any help.
    And sorry for my poor english ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’ve the same problem with Tempera theme and still have no solution yet

    [SOLVED]
    Copy this function inside the file theme-functions.php that can found in
    wp-content\themes\tempera\includes
    ————————-
    // [polylang lang=”en”]English[/polylang][polylang lang=”sp”]Spanish[/polylang]
    function polylang_shortcode($atts, $content = null)
    {
    if (empty($content))
    return ”;
    extract( shortcode_atts( array(‘lang’ => ”), $atts ) );
    if (empty($lang))
    return “<h3>You must specify ‘lang’ using shortcode: polylang</h3>”;

    return ($lang == pll_current_language()) ? $content : ”;
    }
    add_shortcode(‘polylang’, ‘polylang_shortcode’);
    ———————-
    Use the shortcode like this:
    [polylang lang=”en”]English text[/polylang][polylang lang=”sp”]Spanish text[/polylang]

    Thread Starter LookAsh

    (@lookash)

    Great to hear someone managed to solve this problem. I’ll try it in couple of days when i get back home. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Tempera and Polylang – frontpage text translation’ is closed to new replies.