Translating Static Strings

Technically, translating static strings in WordPress is replacing one word with another, regardless of the language. If you want to change the default words, you need to create a language file for for the language you want to translate the plugin into and follow the instructions in this manual.

The manual below is for translating the Plugin into another language. If you need to create a multilingual site and translate the plugin into different languages at the same time please skip this section and follow the WPML integration manual below.

pageTranslating Calculator with WPML

Translation Preparation

Before you start translating the plugin, you need to make sure that the language of WordPress matches the language you want to translate. To change the language go to Dashboard > Settings > General and choose your language in Site Language.

There are several ways to fill up translations. One of them is using the PoEdit platform. You can add translation via editing your .po file and at the end, PoEdit generates a .mo file for you. Then you need to upload ready translation files to primordial folder (plugins\cost-calculator-builder-pro\languages).

The easiest way of translating the theme is by using the Loco Translate plugin. Loco Translate is a free plugin and can be installed from the default repository of WordPress.

Loco Translate Installation

To install the plugin, go to Dashboard and find the Plugins section from the left menu and choose Add New.

You need to search Loco Translate, install it, and activate it on the opened page.

Creating Translation Files

Static strings are available in the Cost Calculator Builder and Cost Calculator Builder Pro plugins. Therefore, in this manual, we will consider how to translate strings and keep translations up to date in these plugins.

Go to Dashboard > Loco Translate > Plugins and choose Cost Calculator Builder.

Here you can create your own language to translate the not editable content of the plugin. Create a language by clicking New language.

Important!

It is required to store the translation file in the “.../wp-content/languages/plugins/” folder to keep translation during the updates.

After clicking the Start Translation button, you will be directed to the Loco Translate editor where you can start translating the plugin strings. Click on Sync button to update available strings available for translating.

Plugins Translation

After synchronizing the strings, you need to select an English text from the Source text box and type in the translations for the selected language below.

The changes above translate the Quantity field label into Spanish:

Continue this step for each of the English text strings in the "Source Text" box.

Please note: Not all of the English text strings really need to be translated, nor should they be translated. For example, some are bits of text your site visitors will never see as it's on your WP Dashboard area. Or, it may be strange-looking bits of code that look like this: %1$s at %2$s. You can ignore these strings.

When finished, click the blue “Save” button.

Translations Update

We are improving the Cost Calculator Builder and Cost Calculator Builder PRO plugins in every update with new features and options. Some of them display on the front end of the website. Therefore, it needs to update the language and translation files to translate the new strings in the theme.

The following steps should be done with Cost Calculator Builder PRO to keep translations updated after plugin updates.

The first thing to do is to update the main language file, where all the theme strings are stored. Go to the Dashboard > Loco Translate > Plugins > Cost Calculator Builder and choose Edit template.

This is NOT a translation file. Manual editing of source strings is not recommended.

Click on the Sync button to merge new strings from the source code to the main language file and click on Save button to save the new strings.

Go to the list of the translation files for updating the needed translations.

Select your translation file and click on the Sync button and Save changes.

Please contact our support team if for some reason the translations do not work even though you have done all according to the manual.

Last updated