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
- Turn on wordpress debug mode / show errors in wp-config.php
- (Optional) Use Duplicator to make a backup of the wordpress install – the operation may break something
- Download the po file from
- https://translate.wordpress.org/projects/wp-plugins/woocommerce
- Find your desired translation, download the “Stable” column
- Rename the po file with this in this EXACT format:
- “woocommerce-[langualge].po”
- For example, if traditional chinese, it is “woocommerce-zh_TW.po”
- 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.)
- Upload the po file to /public_html/wp-content/plugins/woocommerce/i18n/languages/
- Go to WordPress Admin
- Click on WPML, Theme and plugins localization
- Scroll down on the page, click “WooCommerce Multilingual”
- Scroll to bottom of page and click on “Scan the selected plugins for strings”
- Sometimes WPML hang / run out of ram / run out of problems
- You may have to give it more resources to let it load.
- After success, you will see a log in white textarea stating files it skipped vs processed.
- If you scroll up you will see a number for # of strings translated vs not translated.
- After you are done, repeat step 8 by and check “Woocommerce”
- Proceed through steps 9 – 10.
- 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 );