Skip to main content
Additional info
Source Link

I'm trying to change an English text string in a plugin that has the following structure:

├── language
│   ├── albdesign-wc-donations-sq.mo
│   ├── albdesign-wc-donations-sq.po
│   └── default.pot
└── woocommerce_donations_on_cart.php

I'm using only English on the website I installed the plugin, so I could also just edit the English text strings in woocommerce_donations_on_cart.php, but I would prefer a solution that is update-safe.

I read about putting translations in wp-content/languages/plugins/ with the same name of the file(s), but as there are no English .mo/.po files Ithat would probably havenot work.

So I used the code styling project plugin to create them first, wouldn't I?an empty albdesign-wc-donations-en_US.po and added my custom translation like so

msgid "Add a donation to your order"
msgstr "Add a donation"

but that doesn't do the trick.

I'm trying to change an English text string in a plugin that has the following structure:

├── language
│   ├── albdesign-wc-donations-sq.mo
│   ├── albdesign-wc-donations-sq.po
│   └── default.pot
└── woocommerce_donations_on_cart.php

I'm using only English on the website I installed the plugin, so I could also just edit the English text strings in woocommerce_donations_on_cart.php, but I would prefer a solution that is update-safe.

I read about putting translations in wp-content/languages/plugins/ with the same name of the file(s), but as there are no English .mo/.po files I would probably have to create them first, wouldn't I?

I'm trying to change an English text string in a plugin that has the following structure:

├── language
│   ├── albdesign-wc-donations-sq.mo
│   ├── albdesign-wc-donations-sq.po
│   └── default.pot
└── woocommerce_donations_on_cart.php

I'm using only English on the website I installed the plugin, so I could also just edit the English text strings in woocommerce_donations_on_cart.php, but I would prefer a solution that is update-safe.

I read about putting translations in wp-content/languages/plugins/ with the same name of the file(s), but as there are no English .mo/.po files that would probably not work.

So I used the code styling project plugin to create an empty albdesign-wc-donations-en_US.po and added my custom translation like so

msgid "Add a donation to your order"
msgstr "Add a donation"

but that doesn't do the trick.

Source Link

Update-safe translating of single text string in plugin

I'm trying to change an English text string in a plugin that has the following structure:

├── language
│   ├── albdesign-wc-donations-sq.mo
│   ├── albdesign-wc-donations-sq.po
│   └── default.pot
└── woocommerce_donations_on_cart.php

I'm using only English on the website I installed the plugin, so I could also just edit the English text strings in woocommerce_donations_on_cart.php, but I would prefer a solution that is update-safe.

I read about putting translations in wp-content/languages/plugins/ with the same name of the file(s), but as there are no English .mo/.po files I would probably have to create them first, wouldn't I?