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

    (@chouby)

    Maybe your theme is not translated. Check with the plugin Codestyling localization

    on that note… in the docs ( https://polylang.wordpress.com/documentation/setting-up-a-wordpress-multilingual-site-with-polylang/strings-translation/ ) it states “Your theme or your plugins can register the strings to translate in two ways.” but then neglects to tell you what those two ways actually are… only to continue with:

    “When registered in the native way (or with a wpml-config.xml file), the strings are automatically removed from the table when the plugin or the theme is deactivated.”

    Soo… how is it that one registers strings ‘in the native way’ or ‘with a wpml-config’ file? And are those the two ways the documentation is talking about…?

    Plugin Author Chouby

    (@chouby)

    This note is not for developpers but for users who probably are interested in the user interface, but not what happens underhood (e.g wpml-config.xml file and so on).

    So the two ways are:
    1. Non-persistent. The strings are not displayed anymore when de-activating the plugin or theme, but kept in database so that your translations are not lost if you re-activate your plugin or theme later (you can clean the database by checking the option below the table).
    2. Persistent. The strings are displayed in the table even after the theme or plugin has been de-activated. You can remove them by checking the checkbox for each string and then choosing delete in bulk actions.

    I believe that’s what I explained and probably users are not interested to know more.

    For programmers, the first way is obtained by either the function pll_register_string or the wpml-config.xml file. The second way is obtained by the WPML function icl_register_string. I had to make these strings persistent because it is what WPML does and some plugins are thus expecting persistent strings. I believe I explained this in the documentation for developpers

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘new translation strings’ is closed to new replies.