• Resolved hugobs

    (@hugobs)


    hi, i installed the qtranslate plugin and it works great.

    except for category descriptions:

    for each category, i have my category description displayed on the top of category posts (i allow html in category descriptions, with the ‘category descriptions editor’ plugin).

    to have category descriptions displayed above my posts, i inserted this…

    <?php if (is_category()) { ?>

    <?php
    $category = get_the_category();
    echo $category[0]->category_description;
    ?>

    … in my _posts.php.

    with qtranslate, language-switching is usually done thanks to quicktags ([:en]Text [:fr]Texte [:es]Texto) or normal tags <!–:en–>Text<!–:–>(<!–:fr–>Texte<!–:–><!–:es–>Texto<!–:–>).

    in my situation, qtranslate does not switch > all 3 languages are shown (i.e. Text Texte Texto) :(.

    any clue on what has to be tweaked?
    thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter hugobs

    (@hugobs)

    well i found the solution…

    <?php if (is_category()) { ?>

    <?php
    $category = get_the_category();
    _e($category[0]->category_description, ‘qtranslate’);
    ?>

    ….works like a charm!

    hey thank you! it worked for me too

    Does this work for Tag descriptions as well? I tried this code in my templates tag.php, without success:

    <?php
    $posttags = get_the_tags();
    _e($posttags[0]->tag_description, ‘qtranslate’);
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[qtranslate] problem with category description translations’ is closed to new replies.