Skip Navigation

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.

WordPress 6.7 has introduced a new issue that impact translations, please update WooCommerce and WPML to the latest versions before you report issues. More about this here - https://wpml.org/errata/php-error-wp-6-7-notice-function-_load_textdomain_just_in_time-was-called/
Sun Mon Tue Wed Thu Fri Sat
- - 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00 9:00 – 18:00
- - - - - - -

Supporter timezone: America/Lima (GMT-05:00)

This topic contains 19 replies, has 2 voices.

Last updated by Andreas W. 5 hours, 9 minutes ago.

Assisted by: Andreas W..

Author Posts
November 11, 2024 at 10:45 pm #16390389

Andrea Notari

Background of the issue:
Hi
I know that WPML automatically loads 'PO' files stored in

/wp-content/languages/ and
/wp-content/languages/plugins

Please check server path attachment

We use Woocommerce and related plugins, but the existing 'PO' files are not loaded.
These files worked perfectly before using WPML, and I deactivated Loco Translate.

Over the years, some files were updated with Loco Translate, but I am unsure if 'MO' files were always regenerated.

I do not want to import 'PO' files into String Translation because 'PO' files are much faster.

Symptoms:
WPML does not load Woocommerce 'PO' files.

Questions:
Why are the existing 'PO' files not loaded by WPML?
Is there a way to ensure 'MO' files are regenerated correctly?
How can I use 'PO' files without importing them into String Translation?

November 12, 2024 at 9:16 am #16391618

Andrea Notari

I add another question:

/wp-content/languages/ and
/wp-content/languages/plugins

is these folders dangerous in the sense that in the event of an update of the plugin the files can be overwritten? Which folders is best to use?

Really thanks.

November 12, 2024 at 9:35 pm #16394762

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

WPML will save custom language files in /wp-content/languages/wpml.

This files will include your translations from WPML String Translation and enhance the site performance.

WPML will not alter the .po-file found in other folders. It will only read those files once you scan the theme or plugins for new strings at WPML > Theme & Plugin Localization. The translations are then saved on the database on custom WPML tables.

Could you please send me a screenshot from WPML > Languages > Edit languages?

It would also be very helpful if you could send us the WPML debugging information.
More information here:
https://wpml.org/de/faq/provide-debug-information-faster-support/

Best regards
Andreas

November 12, 2024 at 10:11 pm #16394792

Andrea Notari

Hi Andreas.
Please take patience and help me.

Can I copy and past in wpml folder the files po/mo that I using in the past with Loco Translate?
/wp-content/languages/wpml

> This files will include your translations from WPML String Translation and enhance the site performance.

Please could you elaborate better?

> WPML will not alter the .po-file found in other folders. It will only read those files once you scan the theme or plugins for new strings at WPML > Theme & Plugin Localization. The translations are then saved on the database on custom WPML tables.

Please could you elaborate better?

WPML read the file I copy in wpml folder only if I use String Translation?
Could I do not use String Translation and only po/mo files?

We have a large project and a 4,8GB of DB and after enabling WPML the site is quite slow only enabling 1 lang (that for now is hidden because the article are not yet trasnlated).

For better performance WP Media and Stickly links plugins are not activated because I do not need them...

WPML data-lazy-src=
WPML+Pack.png
November 12, 2024 at 11:05 pm #16394929

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

If String Translation is not reading the default .po-file then it could be related to your language settings or maybe a different issue.

Please go to WPML > Languages and click "Edit languages". Now send me a screenshot of the languages table to validate your language setup.

---

The folder /wp-content/languages/wpml will only include mo-files and JSON files.

This folder is not involved in reading default translations from .po-file that are coming with WordPress, Theme or Plugins. It will only save translations that you created on WPML > String Translation.

I can not suggest to replace those files, unless the .mo-file that you are replacing are matching the .po-files.

What you could do if you think it would be requiered to recreate those files:

- Delete the content of /wp-content/languages/wpml
- Go to WPML > Support > Troubleshooting
- In the bottom section click "Show custom MO Files Pre Generation dialog box"
- Run the dialog

This will recreate the custom MO files for WPML.

November 13, 2024 at 9:59 pm #16399935

Andrea Notari

Hi Andreas.

Please could you check what is wrong in my PO/MO files?

hidden link

Please check the "Edit languages" and validate please my language setup.

Another questions (Important for me understand):

1) Confirm that String Translation reading the default .po-file in /wp-content/languages/ without need to import it in String Translation?

2) For better performarce comnfirm that WP Media and Stickly links plugins are manfatory? What other could I do to have more light WPML installation?

Really thanks.

Edit Languages.png
November 13, 2024 at 10:41 pm #16400074

Andrea Notari

The question 2) is

For better performarce confirm that WP Media and Stickly links plugins are not mandatory? What other action could I do to have a more light WPML installation?

I need a light and fast WPML installation because we are small and but sometimes more editors will works at the same time on the site.

Really thanks for your patience.

status.jpg
November 14, 2024 at 12:56 am #16400301

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The language setup is looking correct.

To load the default translations based on the .po-files that come with WordPress, theme and plugins you will need to scan the theme and plugin for new strings at WPML > Theme and Plugin Localization.

This will register the strings on WPML > String Translation and you should by default see available translations coming from the .pot-files that are shipped with the theme or plugins. (instead of a plus symbol you should see a pencil if a translation is saved)

---
Basically you will only need two plugins to run WPML:

- WPML Multilingual CMS
- WPML String Translation

Optional:
- WPML Media Translation (basically needed to upload alternative media files for second languages)
- WPML Sticky Links (make sure that WPML will always use the post ID as permalink and avoid preking links if slugs are changed)
- WPML CMS Navigation (for breadcrubs or dropdown menus)

Compatiblity addons:
Depending on which plugins you are using, you need to install a addon.

For example to translate WooCommerce with WPML, you need to install "WooCommerce Multilingual & Multi-Currency" or to translate Secure Custom Fields or Advanced Custom Fields PRO, you need to install "Advanced Custom Fields Multilingual", and so on.

November 14, 2024 at 10:44 pm #16405278

Andrea Notari

Hi Andreas.

Do you have checked also my PO files?
It's important understand if they are fine.

> To load the default translations based on the .po-files that come with WordPress, theme and plugins you will need to scan the theme and plugin
> This will register the strings on String Translation

So the po files in /wp-content/languages need are not auto loaded but I need scan the theme and plugin, confirm?

And what is the difference between scan the theme and plugin and use String Translation import PO feature? This is important to understand for me.

Another 3 questions:

1) What is the real benefit to have WPML CMS Navigation activated? I could link the menu IT to the menu EN? This is important for me but I do not want sync the 2 menu because they are different. So do I need this plugin?

> to translate WooCommerce with WPML, you need to install "WooCommerce Multilingual & Multi-Currency"

2) I do not need Multi-Currency so what is the real benefit? What do you mean with "translate WooCommerce". With "WPML Multilingual CMS" I just could translate the products.

3) How to translate cart and checkout? Do I need to scan WooCommerce OR use "WooCommerce Multilingual & Multi-Currency"

Really thanks for your patience and attention.

November 15, 2024 at 6:21 am #16405769

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

The strings need to exist in WPML > String Translation so that WPML can display the translations.

Scanning the theme and plugin for strings should register the strings and also load thier translations, if available.

Importing po-files to String Translation has kind of the same effect. You can use this option to import for example po-files that you have created or edited or to import files that come from a different site.

The details about WPML CMS Navigation can be found here:
https://wpml.org/documentation/support/cms-navigation/

The features of WCML are explained here:
https://wpml.org/documentation/related-projects/woocommerce-multilingual/

WCML is mandatory to translate WooCommerce with WPML. It will further make sure that prices and stock remains equal between original products and their translations. The Cart and Checkout will be translatable with WPML > String Translation if you use WooCommerce Shortcodes.

In case you use Blocks in Checkout and Cart then the default translations from WooCommmerce are used. Until now we are not able to overwrite such Blocks with String Translation.

November 15, 2024 at 11:48 pm #16410042

Andrea Notari

Hi Andreas.

Confirm that when I scan theme and plugin, strings and their translation are imported loading all po files in /wp-content/languages? I ask these because in /languages folder I have more that 8 po files.

How could I scan theme and plugin?
How can I do this without crashing the site?

Really thanks.

November 15, 2024 at 11:54 pm #16410045

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

First, please go to Dashboard > Updates > Translation and load the latest translations for your site. This will download all the default language files needed for your site in all active languages.

If this will still not solve the issue, scan themes and plugins go to WPML > Theme and Plugin Localization and scan the theme or plugin(s) for new strings.

Take note, that in case you udpate to WordPress 6.7 you might run into an issue with WooCommerce strings. This is a known issues and will be solved by the WooCommerce Team.

Source:
hidden link

November 21, 2024 at 3:07 pm #16429945

Andrea Notari

Hi Andreas.

After the scan I have some questions:

Why my Theme have more than 1 text domain?
Why Woo Subscription Plugin have 2 identical text domain (Woo Subscription)?

See attachments please.

For the rest I ask:

1) In my Woocommerce usage scenario, many products (now available) in ITA will also be available in EN.
In this scenaio the 2 products have different ID but the same SKU, confirm?
In this scenario when I'm on the product ITA I could click on the other language of the lang switch and then go to the EN product, do you confirm?

2) However some products will remain available only in ITA (without the EN version).
Others still will only be available in EN (without the ITA version).
In the last 2 scenario what critical issues do you see?

3) Once upon a time with WPML I could create an ITA page, then separately create an EN page and only then link them. Is this no longer possible?

Please let me now what do you think?

Really thanks.

Woo Subscription Plugin.png
Strings in the themes -- Textdomain.png
November 21, 2024 at 4:30 pm #16430294

Andreas W.
Supporter

Languages: English (English ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

About the text-domains:

There are different and this seems to be an error inside the plugin. It seems they are calling one string with "woocommerce_subscriptions" instead of "woocommerce-subscriptions". Please inform the WooCommerce Support about this.

About the products:

Each post, page or product has its proper post_id in WordPress. As WPML saves the translations on the default WordPress database tables, it is expected that each product has a unique ID.

The SKU, price, stock and other product details should always be equal between original products and their translations. Our addon "WooCommerce Multilingual & Multi-Currency" handels this when translating the products.

Once a product is translated you will be able to use the WPML Language Switcher and navigate to the translated products.

If posts, products or pages seem not to be connected correclty, you can manually connect them using the following guide:

https://wpml.org/faq/how-to-link-already-translated-pages/

Please let me know if you have any further doubts or questions.

November 21, 2024 at 4:49 pm #16430376

Andrea Notari

Hi Andreas.

And this scenario?

If some products will remain available only in ITA (without the EN version).
Others still will only be available in EN (without the ITA version).
In other words in the IT/EN Store i do not offer always the same products.
What critical issues do you see?

Really thanks!