• Hello

    I’ve installed Polylang and started working with it. So far, looks great.
    I have a problem, though, trying to translate strings through the settings -> languages -> strings translation tab.
    When opened, strings displayed in the tab include site title and a few more strings I want to translate but it also displays the content of some text widgets I have in the site that hold HTML code.
    When I save changes in the screen (no matter what modifications I make, even if I don’t modify anything) text widgets HTML content is saved corrupted (stripped) to the DB and they stop functioning.
    The only way I found to recover is by modifying manually (through phpmyadmin) the polylang_mo entries in posts table and remove all stored translations.

    I do want to translate the main site strings such as title.
    I do not want polylang to touch my text widgets content at all nor save it in the DB.

    How can this be achieved?

    Thanks,
    Sharon

    https://www.ads-software.com/plugins/polylang/

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

    (@chrystl)

    Hi
    It is still possible to have one widget per language, in this way your translations won’t be stored in the polylang_mo: https://polylang.wordpress.com/documentation/setting-up-a-wordpress-multilingual-site-with-polylang/widgets/

    Thread Starter sharonAlR

    (@sharonalr)

    Thank you Chrystl for the reply.

    My widgets are all already defined to only appear for a single language but they still appear under the strings for translation. Maybe because the exsisted in the system before polylang installation? Should I reset/clear something in Polylang options for these string to be removed?

    In the meantime, a workaround I found is to filer the displayed groups. This way I can save strings from groups other than widgets to the DB without corrupting the text widgets.

    sharonAIR, thank you for the work-around: it worked for me. If anyone found how to remove the HTML from polylang string translations please let me know.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Polylang messes up text widgets after saving string translations’ is closed to new replies.