Blog

Wednesday, 02 March 2022 08:31

Translating WooCommerce

Written by 

WooCommerce is already translated into a few languages and does come translation-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:

  • The easiest method is to use a plugin called Loco Translate.
  • More advanced users can use PoEdit.

Both methods are covered in this doc.

Set up WordPress in your language

WordPress needs to be told which language it should run.

  1. Go to: Dashboard > Settings > General and change the Site language.
  2. Go to:  Dashboard > Updates and click on the Update Translations button

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

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

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

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.

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

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

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

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

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:

Fuente: 

Read 4310 times