Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
Client is using a block theme with the Product Results Count block on the product archive page. The string has been translated in String Translation, but the Norwegian page still displays the English string.

Solution:
If you're experiencing a similar issue with string translations not appearing correctly on your site, we recommend you follow these steps:

1. Ensure you have a backup of your site.

2. Update WPML and String Translation to the latest versions. As of the client's issue, these were 4.6.10 and 3.2.11 respectively.

3. Delete the problematic string, then rescan it from WPML > Theme and Plugin Localization and re-translate it via WPML String Translation.

4. On the localization page, add the text domain to "Localization options > Automatically load the theme's .mo file using 'load_textdomain'". You can find the text domain in the "textdomain" column under String Translation.

5. Go to WPML > Support > Troubleshooting and click on the "Show custom MO Files Pre-generation dialog box" option to export .mo files.

6. Re-save the languages by navigating to WPML > Languages > Edit Languages.

7. Verify if the DB charset is configured to utf8mb4 in your wp-config.php file.

If these steps do not resolve your issue, it might be because the solution is outdated or not applicable to your case. We highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket with us.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Ilyes 11 months, 3 weeks ago.

Assisted by: Ilyes.

Author Posts
May 7, 2024 at 1:36 pm #15602434

sasaB

Tell us what you are trying to do?
Using block theme with Product Results Count block on product archive page
Translated string in String Translation:
Domain: woocommerce, Context: with first and last result, English: Showing %1$d–%2$d of %3$d results, Translated Norwegian: Viser %1$d–%2$d of %3$d resultater
But on Norwegian page there is still English string

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

May 7, 2024 at 8:04 pm #15603858

Ilyes
Supporter

Languages: English (English ) French (Français ) Arabic (العربية )

Timezone: Pacific/Easter (GMT-06:00)

Hello,

Thank you for contacting WPML support team,

There are multiple cause that could explain this behavior but here are the most common solutions :

0- Save a backup of you site

1- Update WPML and String translation to the latest version (4.6.10 and 3.2.11)

2- Delete the string, rescan it from WPML > Theme and Plugin localization and re-translate it via WPML String translation

3- On the same localization page, add the textdomain to "Localization options > Automatically load the theme's .mo file using 'load_textdomain'", you could know what the textdomain called in the column "textdomain" under String Transaltion

4- Go to WPML > Support > Troubleshooting and click on "Show custom MO Files Pre-generation dialog box" option, It will then prompt you to export Mo files

5- re-saving the languages by going to WPML > Languages > Edit Languages Could also help

6- Verify if the DB charset configured under config.php to utf8mb4

Please let me know if any of these work for you,

Best,

May 10, 2024 at 10:01 am #15613960

sasaB

Thank you Ilyes, updating String Translation to latest version helped.