LogoLogo
Connectors
WooCommerce Extension 1.0
WooCommerce Extension 1.0
  • WooCommerce Extension 1.0
  • Introduction
    • Features and requirements
  • Install the extension
  • User guide
    • Mandatory WooCommerce settings
    • Tax
      • Display prices in the cart and checkout
    • Enable extension settings
    • Product Meta Fields module
      • Sync products to Digital River
    • Order checkout
    • Cancel an order
    • Refund the order
    • Tax and payments
  • Configure the extension
    • Configure general settings
    • Configure shipping zones
  • Support
  • Developer documentation
    • Modules
      • Logger module
      • Order Management module
      • Product Checkout module
      • Product Meta Fields module
      • Product Sync module
      • Settings module
      • Tax Calculation module
    • Translate the extension
Powered by GitBook
On this page
  • Requirements
  • Translation process
  1. Developer documentation

Translate the extension

Learn how to translate the WooCommerce extension.

PreviousTax Calculation module

Last updated 3 years ago

Any WordPress plugin including digitalriver can be translated to other languages given that the plugin contains a .POT file.

Requirements

  • A .POT file

  • A free version of POEdit software.

  • WordPress command-line interface (CLI)

Translation process

Use POEdit to open the .POT file to create .po(Portable Object) file and transform it into .mo(Machine Object) files. Here, .po is the file created when you translate your POT file to a particular language. For example, fr_FR.po. .MO is the file that the machine can read, it’s a binary file.

Convert your .po file to .mo file. For example, fr_FR.mo.

Consider a scenario where we want to translate this plugin into the Polish language. The Polish language has the locale pl_PL

Run the following command from the plugin directory:

  npm run language:make-po

This will create pl_PL directory inside languages directory. Thepl_PL directory would contain different .po files, one file for PHP strings and others for JavaScript.

Translate the string in the .po file using poedit or any other similar software. More information on how you can translate strings using Poedit can be found . Once all the strings in .po files are translated, run the following command:

    npm run language:make-json

This will create JSON files that contain JavaScript translations.

Congratulations! You have translated the plugin successfully.

here