• Resolved ivomasterche

    (@ivomasterche)


    Hi, i am using a theme based on Cherry Framework. They have set an array with strings translations like this:

    $cherry_locals_arr = array(
    //general
    ‘yes’ => __(‘Yes’, ‘<theme name>’),

    )

    And when i disable Polylang plugin the strings are translated, but when i enable it they are still in English.

    I couldn’t find any info how polylang end __() function go together?

    https://wordpress.org/plugins/polylang/

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

    (@chouby)

    Hi!

    I made a (very) quick test with Cherry Framework and the strings are loaded in the correct language.

    Thread Starter ivomasterche

    (@ivomasterche)

    Hi, thank you for your (absolutely) quick answer.

    It appears that if i check ” The language is set from the directory name in pretty permalinks” instead to be set “by the content” it works ok. Still the content is in the correct language, which is strange.

    Thanks once again.

    Plugin Author Chouby

    (@chouby)

    I see. Some plugins/themes are incompatible with the option “set the language by content”. The reason is that for doing so, Polylang defers translations loading and these plugins/themes preload strings much before they are displayed.

    The plugin/theme expects:
    * load translations
    * store translations in an array
    * display translations

    And what happens when Polylang sets the language from content is:
    * store (not translated) strings in an array
    * load translations (deferred)
    * display (not translated) strings from the array

    So the plugin/theme conflicts with multilingual plugins offering the possibility to set the language from content. That’s one of the reason why Polylang provides the alternative to set the language from url.

    Thread Starter ivomasterche

    (@ivomasterche)

    Thanx once again, maybe you can add a line about this in the string documentation. Any way, your plugin is great. I have just sent a small donation 🙂

    Plugin Author Chouby

    (@chouby)

    Thanks 🙂

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

The topic ‘Polylang disables translations from Cherry Framework’ is closed to new replies.