Viewing 15 replies - 1 through 15 (of 23 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi
    Could you please deactivate all your plugins and test with your theme + only Polylang?
    If it works, reactivate your plugins one by one to find which is causing the issue.

    Thread Starter mateuszn

    (@mateuszn)

    Thanks for quick reply. I didn’t write, but I had already tested that option – deactivated all plugins but Polylang and checked site in ?fresh” browser (with all history, cache, cookies cleared). Unfortunately it did not help.

    Plugin Support Chrystl

    (@chrystl)

    Did you test with a default theme as Twenty Sixteen and only Polylang? Does it work?

    Thread Starter mateuszn

    (@mateuszn)

    Yes, tested with Twenty Sixteen and Twenty Twelve.

    Plugin Support Chrystl

    (@chrystl)

    And which is the result?

    Thread Starter mateuszn

    (@mateuszn)

    Did not work. “pl-PL” set each time in html‘s lang attribute and Polish only menus ??

    Plugin Support Chrystl

    (@chrystl)

    I tested with Polylang 1.8.4 + Twenty Sixteen 1.1 + WordPress 4.4.2 and it works.

    How did you make your updates, by your WordPress admin interface or by the FTP?

    Thread Starter mateuszn

    (@mateuszn)

    We did it via admin interface.

    Thread Starter mateuszn

    (@mateuszn)

    All right, I got some debugging information (at last ?? )

    Notice: Undefined index: wp_the_query in /srv/www/wordpress/lectorium/wp-content/plugins/polylang/frontend/choose-lang-content.php on line 83

    Have you got any idea what might be wrong?

    Plugin Support Chrystl

    (@chrystl)

    Thanks for the notice. In fact the language is not defined on your site. Have you also this notice with Twenty Sixteen + *only Polylang*?

    Thread Starter mateuszn

    (@mateuszn)

    I have just made a test you asked for. I have disabled every plugin, but Polylang and switched to Twenty Sixteen template. Here is how the page looks in Polish: https://snag.gy/s43jM.jpg, and English: https://snag.gy/Uzuos.jpg. Unfortunately the menus do not change.

    Plugin Support Chrystl

    (@chrystl)

    Could you test with the “The language is set from the directory name in pretty permalinks” option?

    Thread Starter mateuszn

    (@mateuszn)

    Still no luck, even with “The language is set from the directory name in pretty permalinks”.

    I’ve installed a debugging plugin and checked “Request”. For Polish page (https://lectorium.edu.pl/pl/) some parts of it look like that:

    [query_vars] => Array
            (
                [lang] => pl
                [debug-this] => request
            )
    
        [query_string] => lang=pl&debug-this=request
        [request] => pl
        [matched_rule] => (pl|en)/?$
        [matched_query] => lang=pl
        [did_permalink] =>

    For English page (https://lectorium.edu.pl/en/) this part looks like this:

    [query_vars] => Array
            (
                [lang] => en
                [debug-this] => request
            )
    
        [query_string] => lang=en&debug-this=request
        [request] => en
        [matched_rule] => (pl|en)/?$
        [matched_query] => lang=en
        [did_permalink] =>

    Would that help?

    Hi Mateusz,

    I don’t use Polylang for a long time, so I don’t know if anything changed, but I noticed that I have to define menu for every language I have on the site (under Appearance > Menus). And every menu has to link to proper pages/posts (ie. in the language of the menu). In other words, Polylang does not seem to translate navigational menu items for you – Chrystl, can you confirm?

    I think you might have the same problem on your site (despite that my site has html lang attribute set correctly). Try to create one menu for Polish (with Polish pages) and assign it to Primary Menu Polish position (or what’s your theme name for the menu position). Then do the same for English.

    Greetings,
    Czes?aw

    Plugin Support Chrystl

    (@chrystl)

    @chesio
    Hi
    In fact it’s not a menu problem. The problem it seems that any time the language is defined by Polylang.

    @mateuszn
    Could you go in Debug this (top admin bar) > Php > Variables: for the _SERVER part I want to see only the line [PHP_SELF] => .
    Please don’t show other informations, since they are relative to your installation. Keep them private.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Does not get language from contents’ is closed to new replies.