This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is experiencing an issue where WPML does not load WooCommerce 'PO' files, which previously worked before WPML was used and Loco Translate was deactivated. The client prefers not to import 'PO' files into String Translation for performance reasons.
Solution:
If you're experiencing this issue, we recommend the following steps to identify and resolve the conflict:
1) Create a staging copy of your site for troubleshooting.
2) Disable all plugins not related to WPML and its add-ons to check if the issue persists.
3) If the problem is resolved, reactivate the plugins one at a time or in small groups to identify the conflicting plugin.
4) If disabling plugins does not resolve the issue, switch to a standard theme like Twenty Twenty-One to check if the theme is causing the issue.
Once the cause is identified, we can replicate the issue and escalate it internally. If you are unable to set up a staging site, please contact us, and we will assist you in setting it up, but we will require admin access to your site.
Please note that this solution might be outdated or not applicable to your specific case. 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 issue persists, please open a new support ticket at WPML support forum.
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.
Tagged: WCML
Related documentation:
This topic contains 22 replies, has 2 voices.
Last updated by Marcel 2 weeks, 3 days ago.
Assisted by: Marcel.
Author | Posts |
---|---|
November 11, 2024 at 10:45 pm #16390389 | |
Andrea Notari |
Background of the issue: /wp-content/languages/ and Please check server path attachment We use Woocommerce and related plugins, but the existing 'PO' files are not loaded. 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: Questions: |
November 12, 2024 at 9:16 am #16391618 | |
Andrea Notari |
I add another question: /wp-content/languages/ and 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 ) Spanish (Español ) 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. Best regards |
November 12, 2024 at 10:11 pm #16394792 | |
Andrea Notari |
Hi Andreas. Can I copy and past in wpml folder the files po/mo that I using in the past with Loco Translate? > 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? 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... |
November 12, 2024 at 11:05 pm #16394929 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) 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 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. |
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. |
November 14, 2024 at 12:56 am #16400301 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) 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) --- - WPML Multilingual CMS Optional: Compatiblity addons: 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? > 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 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 ) Spanish (Español ) 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: The features of WCML are explained here: 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? Really thanks. |
November 15, 2024 at 11:54 pm #16410045 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) 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: |
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? 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. 2) However some products will remain available only in ITA (without the EN version). 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. |
November 21, 2024 at 4:30 pm #16430294 | |
Andreas W. Supporter Languages: English (English ) Spanish (Español ) 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). Really thanks! |