Support » Plugin: Polylang » Untranslated taxonomies/custom taxonomies

  • Resolved filip.jnc


    Hello Chouby,

    First of all, I’ve got to say that this plugins rocks! It’s very light and user-friendly. I have only one issue that I reckon is not a big deal to hack/fix/add an option in the next version of Polylang.

    1. I’m using a static front page
    2. PLL settings
    3. Webpage:
    4. Languages: Romanian(default)/Russian

    My problem is that in case of untranslated categories/posts, polylang language switcher doesn’t show the link to that category/post but to the homepage. For example the category of posts Rezultate (Results) has not been translated and when you are in the default language and hover on the russian flag, you can see the url goes to the russian homepage ( The same goes for single posts.

    The thing is that I don’t to translate these posts and I don’t want to duplicate them either. So I thought if I translate categories and assign each post to 2 categories (default – translated), this post would appear in both romanian and russian posts list. Unfortunately, I can’t assign one post to the counter-language category. If only that was possible, I think all problems on my website would be gone.

    Any advice on this problem? I would be very thankful.

    Kind regards,


Viewing 4 replies - 1 through 4 (of 4 total)
  • PS. The code for my custom language switcher at the bottom of the page:

    if( class_exists('Polylang') && function_exists('pll_the_languages') ) {
    $pll_args = array('show_names'=>0,'show_flags'=>1,'hide_if_empty'=>0,'hide_current'=>1,'raw'=>1);
    $pll_otherlang_array = pll_the_languages($pll_args);
    $pll_otherlang_details = $pll_otherlang_array[0];
    $pll_url = $pll_otherlang_details['url'];
    $pll_flag = $pll_otherlang_details['flag'];
    <div class="mk-polylang-switcher">
    		<a href="<?php echo $pll_url ?>" class="mk-polylang-switcher-link"><?php echo $pll_flag ?></a>
    <?php } ?>

    I’ve just noticed that if I add ?lang=ru at the end of the URL of each post or custom-post, the post is still displayed in the Romanian (default) and the rest is in Russian (even though the post in not translated). This is close to what I want if the post is not translated.


    However, this doesn’t work with categories and other taxonomies + the switcher still wants to redirect me to the homepage (doesn’t add ?lang=ru in the href).
    This still has little-to-nothing to do with my main problem: the translated categories and other taxonomies are empty because I can’t assign untranslated posts to them.

    -> As you can see, the second one is a translated category of posts and it’s empty -> thus the language switcher from default language sees it and doesn’t add the correct URL to the Russian category.

    Any suggestions, tips, codes, idea would be very appreciated! I really don’t want to switch to that heavy WPML…

    I changed some bits of code in this plugin to redirect me to ?lang=ru of the same article if no translation is found and query the default article. It’s not a permanent fix, but I hope Polylang gets the future of displaying default category lists/posts/whatever if no translation found. Cheers.

    Hi Chouby, i agree with filip … this feature should be very helpful.
    Any plans to update your plugin, to manage this situation in a cleaner way?

    Filip … could you share your code modifications?

    thanks, this plugin rocks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Untranslated taxonomies/custom taxonomies’ is closed to new replies.