I want the WooCommerce plugin to display french text (fr_FR
). The rest of Wordpress is correctly set to french but WooCommerce still shows english.
Since version 2.2 language packs are not included. This message is displayed on the admin page:
The recommended automatic "Update translation" procedure involves giving FTP access to my server which I would like to avoid.
There are fr_FR
translations available in the WooCommerce git repo:
https://github.com/woothemes/woocommerce-language-packs/raw/master/packages/fr_FR.zip
I've unziped that in the same folder as the default english language files.
$ ls -l wp-content/plugins/woocommerce/i18n/languages
total 1320
-rw-r--r-- 1 knarf users 211452 24 sept. 18:01 fr_FR.zip
-rw-r--r-- 1 knarf users 116765 22 sept. 10:48 woocommerce-admin-fr_FR.mo
-rw-r--r-- 1 knarf users 211901 22 sept. 10:48 woocommerce-admin-fr_FR.po
-rw-r--r-- 1 knarf users 162575 18 sept. 14:48 woocommerce-admin.pot
-rw-r--r-- 1 knarf users 163575 22 sept. 10:48 woocommerce-fr_FR.mo
-rw-r--r-- 1 knarf users 268719 22 sept. 10:48 woocommerce-fr_FR.po
-rw-r--r-- 1 knarf users 208795 18 sept. 14:48 woocommerce.pot
I've tried setting WPLANG
to french in wp-config.php
:
define ('WPLANG', 'fr_FR');
Despite all this, The "WooCommerce Translation Available" message is still there and WooCommerce interface is still in english. How do I force WooCommerce to switch to french?
Running the "Force Update Translation" procedure (from the message) fails with:
Failed to install/update the translation: An authentication error occurred while updating the translation. Please try again or configure your Upgrade Constants.
I'm using a fresh install of WordPress 4.0 (french release) and WooCommerce 2.2.4.
Go to Settings → General in your WordPress dashboard. Find the Site Language drop-down. Select the language into which you want to change your WooCommerce store. Save your changes.
Go to Falang > Settings > Translate Options tab. To Translate Product Category and Product tags you hav to enable it in the settings too.
Polylang is one of the popular translation plugins for WordPress sites and therefore for WooCommerce sites as well.
From the Translation Docs
PO and MO files will be downloaded in wp-content/languages/woocommerce.
So the woocommerce plugin folder is the wrong place to upload the language pack.
Edit: Important note concerning Language codes
Per @Julian Moreno's comment, the language code (and subsequent code) for WooCommerce must match the code you are using for WordPress.
In my case WordPress is "es_MX" and WooCommerce must be also "es_MX".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With