Translation of texts entered in backend
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
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.
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
Recalculated price suffix text
Custom unit name
Preposition for weight unit when using automatic text
General price suffix text
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