Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter R22

    (@r22)

    Oh, never mind. I have already figured it out. I apologize for this thread, you can close it now.

    Sheesh, where have you been raised ? ??
    When you find your own answer, proper netiquette is to give the solution inside your thread to help people with the same issue in the future.

    As a bonus you don’t have to apologize for posting anymore! Mazing!

    I’ll be answering myself: Use icl_register_string to have the string you want appear in the “Strings translation” tab in the admin area.

    Then use icl_t or pll__ in your site where you want the string to display.

    icl_unregister_string will allow some cleanup, but beware, the string partially remains in the database, in the polylang_mo post_type entries of WordPress wp_posts table.

    This is expected behaviour, so that you don’t lose your hard worked translations when you disable or uninstall Polylang. If you want to clean up any remnants, use the “Clean strings translation database” in the strings translation tab. Any entry listed in this tab won’t be cleaned up, only those you unregistered or pertaining to uninstalled plugins.

    Checkout wp-content/plugins/polylang/include/wpml-compat.php to learn how to use the functions I just talked about.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to translate hardcoded content’ is closed to new replies.