Support » Plugin: Polylang » [Plugin: Polylang] Multilingual theme options

  • Resolved AlbertGn

    (@albertgn)


    During the last couple of weeks I’ve experimenting with several multilingual plugins. I was about to implement WPML (which I downloaded half year ago), but discovered it is no longer freely available. WPML was easy to use and uses the approach one post/page per language. I tried xili-language and qtranslate and some others as alternatives and was about to give it up, when i discoverd Polylang last week! Great plugin, ease of use, works great!

    Only one question. I’m using the Atahualpa theme. As theme options you can set and change texts that will appear in the site (like e.g. texts for “read more” and “previous posts”). How can I make this multilingual with polylang?
    I read the post “how to internationalize a theme”, but that’s not the right direction (I think)…

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

Viewing 12 replies - 16 through 27 (of 27 total)
  • Plugin Author Chouby

    (@chouby)

    Maybe I don’t understand what you want to reach. But putting this
    <a href="%permalink%">… (Cont'd) →</a> in Atahualpa ‘Read More’ option will lead to error in your page. Just use:… (Cont'd) →

    Within Atahualpa customization :
    Atahualpa Theme Options — Post & Pages — Configure EXCERPTS — Custom read more
    I need to have a EN translation for FR String :
    <a href="%permalink%">… (Cont'd) →</a>
    <a href="%permalink%">… (suite) →</a>

    This is not a “nice to have” 😉

    Plugin Author Chouby

    (@chouby)

    I made the test and it works perfect. I wonder. Did you add the option in the list of options to translate?

    $pll_ata_strings = array(
        "multi_next_prev_newer",
        "multi_next_prev_older",
        "custom_read_more", // this one for custom read more
    )

    ;

    I tried to get the fields creating issues, here are my concerns :
    “post_footer_page”,
    “custom_read_more”,
    “more_tag”,
    “comments_next_prev_older”,

    Symptom is :
    when saving, if the current page contains one of these fields, there is a re-init of all translation made to initial version (all pages).

    Plugin Author Chouby

    (@chouby)

    Sorry, I tested all these options and don’t reproduce your problem.

    I reapplied WP last update, same for Polylang and I retried…
    Same result.
    Here is a link to a pict showing the symptom. The only solution I see now is to patch the table involved but I need some directions…

    Chouby,

    In the language set-up (Set-Up Tab), I’ve the following warning :
    Warning: Wrong parameter count for array_unique() in ~/wp-content/plugins/polylang/include/admin.php on line 408

    The line is :
    $terms = array_unique(array_diff($terms, $tr_terms), SORT_NUMERIC); // array_unique to avoid duplicates if a term is in more than one taxonomy

    Sql result of following doesn’t show duplicates
    SELECT term_id FROM wp_termmeta WHERE meta_key = ‘_language’ ORDER BY term_id ASC
    Could it be an explanation ?
    …/…

    Plugin Author Chouby

    (@chouby)

    I don’t think so since this line is not executed for the strings translations list table (however thank you for the bug report linked to the PHP version, I will correct it in the next release).

    EDIT: The problem with array_unique should occur if PHP < 5.2.9
    And WordPress requires PHP 5.2.4
    Could you check PHP version?

    PHP Version is 5.2.6-1
    I’m ready to open an admin access for your investigations.
    Let me know :\

    Plugin Author Chouby

    (@chouby)

    You can contact me here

    Plugin Author Chouby

    (@chouby)

    There is a big issue in Atahualpa 3.7.9. Atahualpa saves options on frontend. Thus, at first visit in a translated language, the options are saved in the translated language and translations (which are done in only one direction) are broken.

    It seems to occur only when using the function ‘bfa_widget_area’. A quick workaround is to comment the line 479 in functions.php

    update_option('bfa_ata4', $bfa_ata);

    I don’t know how much it impacts the theme.

    Here is another possible solution which does not modify the theme (possible with 2 languages but difficult to manage with more than 2).

    Polylang does keep all the translations while the checkbox “Clean strings translation database” is kept unchecked. It is then possible to save all the options in the first language and translate them. Then resave all the options in the second language and translate them. Although it won’t be “visible”, the translation will work in both directions while keeping “Clean strings translation database” unchecked.

    The best solution would be a modification of the theme which must not update the option which contains translatable strings on frontend as it most probably breaks all multilingual plugins.

    NB: v0.9.5 should solve the other issue reported by @treeas (which was depending on the installation, maybe PHP version)

    For the moment, temporary fix is Ok.
    I notified the option front-end reset issue to Atahualpa support.
    Thanks Chouby.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘[Plugin: Polylang] Multilingual theme options’ is closed to new replies.