Skip to content Skip to sidebar

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

Problem:
The client is experiencing an issue where the default language of their website is set to Dutch, but some plugins still display content in English. This inconsistency is causing mixed language displays on certain pages.
Solution:
First, we recommended increasing the WordPress memory limit as it was below the minimum requirements for WPML. The client can do this by adding the following lines to their wp-config.php file:

/* Memory Limit */<br />define('WP_MEMORY_LIMIT', '256M');<br />define('WP_MAX_MEMORY_LIMIT', '256M');

Next, we advised updating WPML to the latest version to ensure all features are up to date. After updating and adjusting the memory limit, the client should make a minor edit (like adding and removing a '+' sign) on a page where the issue occurs to trigger an update in the translations.
Additionally, enabling the setting 'Look for strings while pages are rendered' in WPML's settings resolved the issue, allowing the client to translate the strings correctly.

If this solution does not resolve your issue, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/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.

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 2 replies, has 2 voices.

Last updated by nicod-4 1 year, 8 months ago.

Assisted by: Marsel Nikolli.

Author Posts
August 22, 2024 at 12:11 pm #16094792

nicod-4

Background of the issue:
I am trying to set the default language of my website to Dutch. However, sometimes plugins think the default language is English, causing some translated texts to be in Dutch and others in English. Here is a link to a page where the issue can be seen: hidden link

Symptoms:
Some parts of the website show English as the default language and some parts show Dutch as the default language. Specifically, I see some words in English such as '0 products in compare' instead of everything being in Dutch.

Questions:
Why are some parts of my website showing English as the default language while others show Dutch?
How can I ensure that the default language is consistently set to Dutch across all plugins and pages?

August 22, 2024 at 2:45 pm #16095603

Marsel Nikolli

Hi,

Thank you for contacting WPML Support, I will gladly help you.

1) From the debug info you provided, I noticed that the WP memory limit needs to be increased, WordPress uses 40Mb as default and the minimum requirements for WPML are 128 MB. Kindly check this page for more information.

You can increase it by adding the following code to your wp-config.php file right before the line: /* That's all. Stop editing! Happy publishing. */

/* Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M');

2) Also, I noticed that you are using WPML v4.6.10, I suggest you update to the latest version (it would be a good practice to update any other plugin that might require an update).

After you've increased the memory limit and updated the plugins please try making a small change on one of the pages where you are having issues (ex. add a small "+" sign and remove it again, that should trigger an update on the translations as well) and check if the issue persists.

* Note: Please make sure you have a full backup of your website before making any updates/changes to your website.

Let me know how it goes,
Marsel

August 23, 2024 at 7:02 am #16097351

nicod-4

Hi Marsel,

I have updated the plugin and set the WP memory to 256M. This didn't solve the issue. I checked the support documentation of WPML and found the solution. I had to enable the setting "Look for strings while pages are rendered", after this was enabled the translation showed up in string translation and I was able to translate the string.

Thanks for your help and time.