# Translations

Both plugin editions use the `direct-payments-for-woocommerce` text domain. The plugin version is 2.6.4.

WordPress selects the front-end language from Settings > General > Site Language and the admin language from Users > Profile > Language. Install/select the desired WordPress language normally; the plugin does not change site or user language preferences.

This folder contains a shared POT template, editable PO files, compiled MO files for PHP, and Jed JSON files for JavaScript. WordPress.org language packs can provide reviewed translations through the normal WordPress translation system. Local custom translations can also be placed in wp-content/languages/plugins with the same text-domain and locale naming convention.

## Bundled locale packs

All 38 locales from the reference screenshots are included:

ca, zh_CN, zh_TW, cs_CZ, nl_NL, nl_BE, en_AU, en_CA, en_NZ, en_ZA, en_GB, en_US, fr_BE, fr_FR, gl_ES, de_DE, de_CH, it_IT, ja, ko_KR, lo, fa_IR, pl_PL, pt_BR, ru_RU, sr_RS, sk_SK, es_AR, es_CL, es_CO, es_EC, es_MX, es_ES, es_VE, sv_SE, tr_TR, uk, vi.

These bundled translations were machine generated and need review by fluent speakers before a public release. Regional locales share base-language wording; English locales currently use the source English. Unknown strings and translations that fail markup/placeholder checks fall back to English. The language files translate interface text and default wording; saved merchant instructions, account names, account details, and other user-entered content are preserved.

HTML tags, element attributes, payment identifiers, shortcodes such as [Amount] and [Customer_email], URLs, and printf placeholders must not be changed when reviewing the translations. HTML messages are translated by their visible text segments while retaining the original markup. Review plurals and payment/refund terminology carefully.

## Maintaining the files

Edit the locale PO file with a gettext editor such as Poedit or a WordPress translation tool, then compile its MO file and regenerate the associated JavaScript JSON files. Keep the shared text domain for both free and pro.

Generate the template with WP-CLI:

```text
wp i18n make-pot . languages/direct-payments-for-woocommerce.pot --domain=direct-payments-for-woocommerce
```

If preparing one shared catalogue for both editions, merge both editions' extracted templates before translating. Preserve source-file references so the correct script JSON hashes can be generated.

The WordPress.org plugin-page Languages list is generated by WordPress.org's approved translation projects. Shipping these files locally does not publish or approve translations on WordPress.org. Contributors can work on the free plugin at https://translate.wordpress.org/projects/wp-plugins/direct-payments-for-woocommerce/ .

No online translation service is called by the plugin at runtime. Its translation files are bundled locally and managed with WordPress APIs.
