Skip Navigation

Resolved

Resolved in: 3.0.7

Overview of the issue

Some very specific strings, registered via the wpml_translate_single_string hook or the deprecated call to icl_translate may not translate in some cases.

Our developers are working on fixing this.

This is happening because of our new translation mechanism and because the affected string may be modified so it’s not the exact value as it is saved in the database.

Workaround

  1. First, find the problematic string.
  2. Go to the WPML -> String Translation page and remove the problematic string.
  3. Go to the WPML -> String Translation page and in the Auto register strings for translation section, enable the Look for strings while pages are rendered option.
  4. Re-visit the page on the front-end where the string appears.
  5. Re-visit the WPML -> String Translation page and search for that string.
  6. Translate the string.

After translating the string, remember to un-check the auto-registration option.

13 Responses to “In some cases some strings are not translating properly”

  1. We’re still having some issues with certain strings not translating in the OnePress Plus theme. We have tried the workaround several times but as soon as we uncheck the auto-registration option, the strings revert back to their original language.

    Re-installing the WPML plugin doesn’t seem to work either.

    Any ideas?

    • Hello!
      Are you sure that the string is coming from the theme?
      If that is the case, perhaps the theme needs to be scanned too in WPML > Theme and plugin localizations page.

      If nothing of that helps, then you should drop us a line at our forum, preferably with a means to reproduce the problem (staging site where the issue was reproduced or a Duplicator package with the theme) – so that we can investigate the issue.

  2. Hello George, i’m in contact with Raja of WPML.

    In our case
    “Thanks for your order. It’s on-hold until we confirm that payment has been received. In the meantime, here’s a reminder of what you ordered:”
    in /wp-content/plugins/woocommerce/templates/emails/plain/customer-on-hold-order.php
    is not translated.

  3. I have the same issue. I tried this workaround but doesn’t work and plus now looks like that string (from the 15zine theme) doesn’t appear anymore

  4. I am having the exact same problem after the most recent update. Some of my string translations are no longer being translated, both in the default site language or the second language. If I try the above workaround, everything is fine as soon as I check the auto-registration option. If I uncheck it or let it run until it automatically stops, the strings are no longer translated. I’ve tried deleting the problematic strings in the string translator and re-translated them, but the problem persists. It’s curious that the problematic strings seem to be fine in the back end when switching the language of the WP admin interface, and are only an issue in the front end.

    Until this is fixed, is it possible to somehow keep the auto-registration running, instead of stopping after 2 hours? It does not seem to have any noticable implications for my site’s performance.

    Thanks very much.

    • Hello!

      Can you create a forum ticket and provide us with a duplicator package? There may be many reasons which cause your problem, and I would like to debug it. The “auto-registration” is only a workaround and it hides the issue which we should resolve.

      I believe I can give you a better solution if only I get your site clone for testing.

  5. Hello, I have exactly the same issue after updating to latest version.

    I have 4 languages configured like that:

    https://www.site.com/ <– this is "de-DE", but just hidden language code
    https://www.site.com/en-DE/
    https://www.site.com/de-AT/
    https://www.site.com/en-AT/

    I use to display translations in the template.

    On the home page (default language), ‘.’ (dot) is displayed, so the default text, and translation is not used.
    On other languages, translations are displayed correctly!

    Maybe the language code that is missing is the problem?

    Just wanted to drop this info as a hint for the investigation.

    • I also just realised, that .mo files were not generated for the default ‘de-DE’ language. I see only 3 files generated, for ‘de-AT’, ‘en-AT’ and ‘en-DE’.

      • Finally I found the issue.

        For some (unknown) reasons, I had wrong entry in “wp_icl_locale_map” table in DB.
        There was a row with “de-DE”=>”de_CH” values.

        I changed it to “de-DE”=>”de_DE” and now everything works as previously.

        That means, that the plugin was loading wrong locale to my default language.

  6. Hello there, one month ago I had the same problem and after a super kind support of your team it seamed to be solved.
    But it is not.
    In fact, after some changes to the page where the first string was, all strings and also the first one loose the translation again. It is the third time that I spend many hours to translate the strings again but, every time a make a change, I have to re-translate everything. I’, getting crazy!
    Please don’t make me write another ticket.
    The plugin is updated but nothing changed.
    Thank you