• permaliens :
    http://histoiredantan.com/%postname%/
    using a static front page :
    oui (1 en français, 1 en anglais)
    your Polylang settings :
    La langue est déterminée par le nom du répertoire dans les permaliens
    Exemple : http://histoiredantan.com/en/my-post/

    Bonjour
    Depuis la mise à jour de wordpress 4.0, j’ai un souci que je n’avais pas avant.
    Je fais une listbox perso, et donc je recupere les infos de langue avec :
    $translations = pll_the_languages(array(‘raw’ => 1));

    Tous marcher parfaitement bien, jusqu’au moment ou j’ai mis la maj de wordpress 4.0.
    Donc depuis, sur la page d’accueille de mon site (toutes les autres page marche parfaitement bien).
    Quand je selectionne la page d’index en anglais, la fonction :
    pll_the_languages(array(‘raw’ => 1))
    Me renvoi les informations, mais avec la propriété [no_translation] => 1, pour les 2 langues (français et anglais), c’est à dire il n’ya pas de traduction pour cette page, alors que oui.

    C’est surtous etonnant, car quand je met la page index en français, j’ai bien cette propriété à vide, donc il y a une traduction et tous marche bien.

    Qu’elqu’un a til, rencontré ce genre de probléme?
    L’adresse du site http://histoiredantan.com

    https://ww.wp.xz.cn/plugins/polylang/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    Sorry for mods, I will answer in French 😉

    Bonjour,

    Je suggère juste de resauver le lien entre les deux pages en éditant une page et en la sauvegardant sans faire de modifs après avoir vérifier que le titre de la page traduite est bien présent et correct dans le champs de traduction.

    Thread Starter atb83

    (@atb83)

    Thanks chouby

    I perform the handling, but it did absolutely nothing to change.
    the property “no_translation” still remains at 1.
    So my page hangs because big mistake javascript.

    This is surprising because on the other pages, this information is good.
    Be little that’s because it’s the home page?

    Plugin Author Chouby

    (@chouby)

    On admin side, when you edit the English home page, do you see the the French home page title as translation in the Languages metabox? The same for the French home page?

    Thread Starter atb83

    (@atb83)

    yes, not a pb on admin page.

    I get this result when I do a print_r of pll_the_languages ​​(array (‘raw’ => 1)) :

    Array ( [0] => Array ( [id] => 2 [slug] => fr [name] => Français [url] => http://histoiredantan.com/ [flag] => http://histoiredantan.com/wp-content/plugins/polylang/flags/fr_FR.png [current_lang] => [no_translation] => 1 [classes] => Array ( [0] => lang-item [1] => lang-item-2 [2] => lang-item-fr [3] => no-translation ) ) [1] => Array ( [id] => 4 [slug] => en [name] => English [url] => http://histoiredantan.com/en/ [flag] => http://histoiredantan.com/wp-content/plugins/polylang/flags/en_US.png [current_lang] => 1 [no_translation] => 1 [classes] => Array ( [0] => lang-item [1] => lang-item-4 [2] => lang-item-en [3] => current-lang [4] => no-translation ) ) )

    Plugin Author Chouby

    (@chouby)

    So maybe there is a conflict with your theme or another plugin. Because it’s clear that for Polylang your front page in English is not the translation of your front page in French (no link between them).
    NB: It works on my test install with WP4.0 + Polylang 1.5.5 + Twenty Twelve.

    Thread Starter atb83

    (@atb83)

    Ok, but I basically have WooCommerce and Polylang as big plugin.
    Before it worked very well.
    I put the maj of WooCommerce it work good, and then making Polylang maj and the bug.
    Where I have to look in the plugin or db to see if the links work well on index page? to try to identify the pb?
    thank you

    Plugin Author Chouby

    (@chouby)

    On admin side, if you look in the pages list table, in the row corresponding to your french home page, you should see a pen in the English column. The same in the row corresponding to your English page and the French column.

    In DB, it is a bit complex as the translations are taxonomies.
    So in the wp_term_relationships table, you have all terms (term_taxonomy_id column) linked to your pages (object_id column).
    Then you can find the terms in the wp_term_taxonomy table. Your 2 pages should share a same term in the taxonomy ‘post_translations’.

    Thread Starter atb83

    (@atb83)

    Thanks chouby

    I advanced, I am not going into the db.
    But I managed to resolve the concern, by unchecking the admin panel Polylang the box “The address of the home page contains the language code instead of the name of the page”.
    So suddenly I fell with a url that owns the name of the page, so the “http://histoiredantan.com/en/home/” type.

    In the meantime it will do, but I would have to have a URL “http://histoiredantan.com/en/” type.

    To summarized:
    – “Pll_the_languages ​​(array (‘raw’ => 1));” does not return me to the french translation when I check the box in the admin “L’adresse de la page d’accueil contient le code de la langue au lieu du nom de la page “.
    – The side of the pages in the admin everything is ok
    – The theme and rare plugin installed are not at issue, as this function before and all has been verified.

    Apparently to hide the page name in the URL when you are not in the default language, pose bp Polylang to find the page.
    Have you a solution?

    Plugin Author Chouby

    (@chouby)

    I am really sorry, but after several tests, I just can’t reproduce your problem. Unless there is a conflict with your theme or another plugin, I don’t undertand what can happen.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘pb avec pll_the_languages(array('raw' => 1))’ is closed to new replies.