This tutorial is intended for experienced WordPress users

Translation of texts entered manually in back-end is not an easy task. Because the texts are not part of the source code they are also not prepared for translation. For this case I have created so called “proxy texts”.  The whole translation of manually entered texts then uses a small hack of WordPress itself. The hack uses a WordPress feature — the texts are translated always even into the default site language. So you will create a translation into the default language of the site.

So for example you want to enter some prefix text before the recalculated price. The default language of the site is English (United States). You will use the field “Recalculated price prefix text” and want to insert there a text “Unit price:” but as this text is not in the source code you need to use the proxy text, which I already planted there: “recalc-prefix-1“. Then you will translate this text into English as “Unit price:” and then let’s say into my native language Czech as “Jednotková cena:“. This way you can translate all entered texts. The list of proxy texts will be on the end of this article. There is five of them for each field.

Example of the translation

First thing is to check the default language of the site. You can find it under Settings-> General -> Site language

In this tutorial it is English (United States)

Then we will prepare the product itself with the “proxy text”. In this case we will be translating field Recalculated price prefix text and the one of proxy texts is recalc-prefix-1 so we will enter this text into the field

As you can see on the front-end right now there is just untranslated proxy text.

As a next step you need to install translating plugin Loco translate translate/

Then you will start to translate the plugin. The quickest way to go there is to go to Plugins->WooCommerce Price per Unit PRO and click Translate

In the next step we will add the new language English (United States)

You will find it among installed languages

You need to select location of the translated file. The most recommended option is to choose Custom location as this file will never be overwritten, but then the plugin Loco translation have to be activated. If you choose System the translating plugin can be deactivated or even deleted when you will finish your translation. Do not choose Author though as this file can be overwritten by some translation made by me.

Then we will find the proxy text for translation. It can be found directly by its name recalc-prefix-1 or you can also search by the context which is here set to the name of the field Recalculated price prefix text. This applies for all the translatable fields.

Now we will translate the word into Unit price: and this way we will replace its display for the default language.

And as you can see on the front-end it is already replaced.

For other languages just repeat the process with some different language selected for translation. In my case it will be Czech language and the text is Jednotková cena:

And after switching your site into the desired language you can see that it works perfectly.

List of all proxy texts together with other translatable texts, already included in the plug-in

In Bold are names of fields under which you can find it in back-end and then there are actual text for translation

Recalculated price prefix text
‘Unit price:’

Recalculated price suffix text

Custom unit name

Preposition for weight unit when using automatic text

General price suffix text
‘without VAT’

Variations – variable price prefix

Display of the settings in front-end and back-end

General settings responsible for some texts

Front-end with automatic text and custom unit name

Product editor with automatic text and custom unit name

Front-end with manual suffix

Product editor with manual suffix

Front-end of variable product with automatic text and custom unit name