Translating WooCommerce (Localization)

WooCommerce comes localization-ready out of the box. All that’s needed is a translation file for your language.

There are several methods to create a translation, most of which are outlined in the WordPress Codex. In most cases you can contribute to the project on translate.wordpress.org. For creating custom translations:

Both methods are covered in this doc.

Set up WordPress in your language ↑ Back to top

WordPress needs to be told which language it should run.

  • Go to: Dashboard > Settings > General and change the Site language.

Once this has been done, the shop displays in your locale if the language file exists. Otherwise, you need to create the language files (process explained below).

Contributing your Localization to Core ↑ Back to top

We maintain translations at our project on GlotPress. If you want to contribute translated strings to your language or wish to start a new translation, register at WordPress.org and start translating.

Translating WooCommerce into your language ↑ Back to top

Translation is managed by teams over at translate.wordpress.org. Stable versions and development versions of WooCommerce are translated here, and anyone can contribute.

When you install or update WooCommerce, WordPress will look for a 100% complete translation in your language and automatically download it. If there is no 100% complete translation you can download it manually, or we encourage you to contribute to get it to 100% so all users can benefit.

If you’re new to translating, checkout the translators handbook to get started.

Downloading translations from translate.wordpress.org manually ↑ Back to top

1/ Go to https://translate.wordpress.org/projects/wp-plugins/woocommerce and look for your language in the list.

2/ Click the title to be taken to the section for that language.

2016-02-17 at 09.57

3/ Click the heading under Set/Sub Project to view and download a Stable version.

2016-02-17 at 09.59

4/ Scroll to the bottom for export options. Export a .mo file for use on your site.

2016-02-17 at 10.00

5/ Rename this file to  woocommerce-YOURLANG.mo (e.g., Great Britain English should be en_GB).

6/ Upload to your site under  wp-content/languages/woocommerce/. Once uploaded, this translation file may be used.

Creating custom translations ↑ Back to top

WooCommerce includes a language file (.pot file) that contains all of the English text. You can find this language file inside the plugin folder in woocommerce/i18n/languages/.

Creating custom translations with Loco Translate ↑ Back to top

1/ Download the free plugin called Loco Translate from here. Or add directly from the WordPress administration via Plugins > Add New.

2/ Install and Activate.

3/ Go to the new Loco Translate menu item created in your Dashboard with five sub-sections.

4/ Go to the Plugins section, and select WooCommerce:

5/ Add new languages using the Add New Language link:

6/ Choose the language to add in the list, or enter the language ISO code (ex: fr_FR, en_US etc…), and select the folder to add the translation files to, and click Start Translating:

Note that Loco Translate offers three different locations for your create the translating, the best choice is Custom if you are looking to have your own custom translating, you should avoid “Author” location since it’s inside the plugin and will be override on updates, there is also the “System” location that will be override by translations from translate.wordpress.org.

7/ Save when finished:

Note that when a new version of WooCommerce is released and updated on your site, you need refresh the .po file to look for new strings. Use the “Sync” button to find any new string to start translating.

Creating custom translations with PoEdit ↑ Back to top

PoEdit is a more advanced alternative to Loco Translate. Only advanced users or translators wishing to create a custom translation to WooCommerce should attempt this method.

WooCommerce comes with a POT file that can be imported into PoEdit to translate.

To get started:

1/ Open PoEdit and go to File > New catalog from POT file.

2/ Choose woocommerce.pot and PoEdit will show the catalog properties window:

Properties
Properties

3/ Enter your name and details, so other translators know who you are, and click ‘OK‘.

4/ Save your .po file. Name it based on what you are translating to, i.e., a GB translation is saved as woocommerce-en_GB.po . Now the strings are listed.

Translate the strings
Translate the strings

5/ Save after translating strings. The .mo file is generated automatically.

6/ Update your .po file by opening it and then go to Catalog > Update from POT file.

7/ Choose the file and it will be updated accordingly.

Making your translation upgrade safe ↑ Back to top

WooCommerce keeps translations in wp-content/languages/plugins, like all other plugins. But if you wish to include a custom translation, you can use the directory wp-content/languages/woocommerce, or you can use a snippet to load a custom translation stored elsewhere:

Translating text without a localization file ↑ Back to top

Translate or replace default text ↑ Back to top

Using the Say What? plugin can assist if you only wish to translate or change a few words without editing a WordPress theme’s .PO file. Requires no custom code.

When activated, it asks for:

  1. Original string — text you are translating. View the plugin source code to see the exact string.
  2. Text domain — woocommerce
  3. Text you want to display

WooCommerce - the most customizable eCommerce platform for building your online business.

Back to the top