WordPress.org

Ready to get started?Download WordPress

Forums

Polylang
Use language from browser if available, fallback to what is available instead (2 posts)

  1. yoush
    Member
    Posted 2 years ago #

    Hi.

    I'm running a small blog site at http://yoush.homelinux.org:8079/

    I've been blogging in english for a while, but now I want to blog in two languages, russian and english. In particular, I want to write some post in english, some in russian, and some in both languages.

    When my site is opened, I want interface to be in language defined by browser, and each post displayed in language defined by browser if available, but fallback to other language if requested language is not available for that post. E.g. if browser is configured to prefer russian, then display post in russian if available, and display it's english version if russian version does not exist.

    Is this possible with Polylang?
    If not, could this please be implemented?
    Or maybe this is possible with some other multilingual plugin?

    I've tried to install and activale Polylang 0.5 (into WordPress 3.3), define Russian and English languages, and add define('PLL_DISPLAY_ALL', true); to wp-config.php

    But blog opened empty (although, per documentation, PLL_DISPLAY_ALL should make it to display content with no language defined).

    Then I checked "set default language for all posts" and got content back. However, in language switch widget, there is only English, and site interface is in english - although my browser prefers russian, and theme (Suffussion) has russian localization installed, it is displayed if I set WPLANG to ru_RU.

    All that is not what I want ...

    http://wordpress.org/extend/plugins/polylang/

  2. Chouby
    Member
    Plugin Author

    Posted 2 years ago #

    If you want that your English post appears in both English and Russian blogs, then you effectively must set PLL_DISPLAY_ALL to true and define no language for this post. It's not normal that you got nothing in this case. Maybe it occured because all your posts had no language defined. I am not sure I tested this case.

    The Russian language in the widget should appear when you will write your first post (or page) in Russian. If there is no content to display, then the link does not exist...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags