I tried the standard way of translating the Continue button of the Paytrail payment gateway plugin by editing the .po/.mo files of WooCommerce and the plugin itself. I found one string for “Continue”, that was translated correctly to “Jatka”, but it seemed to be the wrong string, as having that translation in place, did nothing for the Continue button of the Paytrail payment gateway plugin. So I started writing a support request for the plugin, reporting about a bug, as it really seemed to be one. And just when I was ready to send my complaint, the automatic system of WooCommerce support showed me the answer that I couldn’t find by searching on DuckDuckGo or Google. It was there, but they talked about SkyVerge plugins in general, not the Paytrail plugin, for which I was trying to find the answer. Anyway, having followed the directions in that hard-to-find document, I was finally able to translate that one crucial word. Having a missing translation in such an important place of the checkout process, had already decreased the use of this payment gateway – as we saw an increase in manual payments. People were afraid to use the button with an untranslated label. Small things like this matter a lot.
Here are the instructions on how to translate the SkyVerge Paytrail plugin, to Finnish or any other language. Here I’m going to use -fi.po and -fi.mo extensions as examples of the filenames.
This is what they tell you in the hard-to-find document.
If you have already started a translation of the framework .pot file, you can skip steps 1 through 5 and just rename the .po and .mo files to woocommerce-plugin-framework-fi.po and woocommerce-plugin-framework-fi.mo.
- In your plugin, find the woocommerce-plugin-framework.pot file in lib/skyverge/woocommerce/i18n/languages/woocommerce-plugin-framework.pot
- Open the woocommerce-plugin-framework.pot file in PoEdit or similar and click on Create New Translation.
- Set the language of the translation and click OK
- Select File > Save then save the file on your computer, ensuring that you name it exactly woocommerce-plugin-framework-nb_NO.po (the .po extension should be added automatically by the application).
- Translate some strings and click on File > Compile to MO… and ensure you name the file exactly woocommerce-plugin-framework-nb_NO.mo
- Once you have made a few test translations, upload both the .po and .mo files via FTP to the wp-content/languages/woocommerce-plugin-framework/ folder in your site (you will likely have to create this folder). The two files should have the following paths:
- Visit the frontend or admin of your site to verify if the new translations were picked up. If not, please send us admin and FTP credentials and we would be more than happy to troubleshoot.
- Assuming the translation test passed, complete the translations on your local computer, recompile the MO file when satisfied, then upload the two files again to the wp-content/languages/woocommerce-plugin-framework/ directory.