How to Load Existing Translations to Woocommerce with WPML?

View QuestionsCategory: QuestionsHow to Load Existing Translations to Woocommerce with WPML?
admin Staff asked 7 years ago

I am looking to load entire .po / .mo translated strings for Woocommerce. 
Currently using WPML for multi-language translation.
Plugins: Woocommerce, WPML

1 Answers
Best Answer
admin Staff answered 7 years ago

 

  1. Turn on wordpress debug mode / show errors in wp-config.php
  2. (Optional) Use Duplicator to make a backup of the wordpress install – the operation may break something
  3. Download the po file from
    1. https://translate.wordpress.org/projects/wp-plugins/woocommerce
    2. Find your desired translation, download the “Stable” column
  4. Rename the po file with this in this EXACT format:
    1. “woocommerce-[langualge].po”
    2. For example, if traditional chinese, it is “woocommerce-zh_TW.po”
    3. Note, the website has wrong file name. It downloads as “woocommerce-zh-tw“. You need to change it yourself to fit the WPML code exactly. (If you dont rename properly, WPML will not detect it. Find out the exact correct code before proceeding.)
  5. Upload the po file to /public_html/wp-content/plugins/woocommerce/i18n/languages/
  6. Go to WordPress Admin
  7. Click on WPML, Theme and plugins localization
  8. Scroll down on the page, click “WooCommerce Multilingual”
  9. Scroll to bottom of page and click on “Scan the selected plugins for strings”
    1. Sometimes WPML hang / run out of ram / run out of problems
    2. You may have to give it more resources to let it load.
  10. After success, you will see a log in white textarea stating files it skipped vs processed.
    1. If you scroll up you will see a number for # of strings translated vs not translated.
  11. After you are done, repeat step 8 by and check “Woocommerce”
  12. Proceed through steps 9 – 10.
  13. Once you are done, you will see that a large number of strings are translated.

 

Reference URL: Woocommerce Translation Instructions: https://translate.wordpress.org/projects/wp-plugins/woocommerce

 

Debug Mode Code:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', true );
@ini_set( 'display_errors', 1 );
define( 'SCRIPT_DEBUG', true );