• Is it possible to write posts only in one language and doesn’t display in other language anything at all? For example I have two languages on my website: English and Georgian. I want that when I write posts for example only in Georgian, it must be visible only when viewing site in Georgian language. Is it possible?

    Sorry for my English I’m from Georgia

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi levani01, try following hack: in qtranslate_core.php on line 457, right under comment, add “return null;”

    // content not available in requested language (bad!!) what now?
    return null;

    Remember to do this after every plugin update.

    I managed to do it by reading what mkdotam said and changing the_loop.

    One of my loops look like:

    <?php query_posts('showposts=10&category_name=news'); 
    
        if (have_posts()) : while (have_posts()) : the_post(); 						
    
        $hasLanguageContent = get_the_title();
        if($hasLanguageContent != "") :
        //if title is not an empty string, show the code below
    ?>
    
        <div class="news-list">
            <a href="<?php the_permalink() ?>">- <?php the_title() ?></a>
        </div>
    
    <?php
    endif;
    endwhile;
    endif;
    ?>

    sjardim where is that loo? in archive.php or in a single post?
    I’v added
    return null;
    right after
    // content not available in requested language (bad!!) what now?
    in qtranslate_core.php but it doesn’t appear to be working. I cant see any hangings in any loop. Here’s by page: https://www.coldtwilight.com/ – site second post should only appear in polish language.

    If I could make this work, I could finally ignore other problems with this plugin. Can you please advise me something?

    Thread Starter levani01

    (@levani01)

    Has anything changed about it new version of qtranslate?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: qTranslate] Write post only in one language’ is closed to new replies.