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
mkdotam
Member
Posted 11 months ago #
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.
sjardim
Member
Posted 10 months ago #
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;
?>
satarte
Member
Posted 10 months ago #
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: http://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?
Has anything changed about it new version of qtranslate?